Julian Sedding created SLING-8313: ------------------------------------- Summary: JcrResourceProvider#move fails when moving to root resource Key: SLING-8313 URL: https://issues.apache.org/jira/browse/SLING-8313 Project: Sling Issue Type: Bug Components: JCR Affects Versions: JCR Resource 3.0.18 Reporter: Julian Sedding
The {{JcrResourceProvider#move}} method uses string concatenation to determine the destination path. {code:java} final String dstNodePath = destAbsPath + '/' + ResourceUtil.getName(srcAbsPath); {code} If {{dstAbsPath}} is the root path {{/}} and {{ResourceUtil.getName(srcAbsPath)}} is e.g. "foo", then the concatenated path becomes {{//foo}} (with a leading double slash), which causes the move to fail. The construction of {{dstAbsPath}} should handle this scenario properly. -- This message was sent by Atlassian JIRA (v7.6.3#76005)