Skip to content

Commit

Permalink
JCR-2920: Workspace.copy(src, dest) throws unexpected RepositoryExcep…
Browse files Browse the repository at this point in the history
…tion ("Invalid path")

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1082620 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
stefan-guggisberg committed Mar 17, 2011
1 parent 2f7a515 commit 6261420
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,11 @@ private String getItemUri(NodeId parentId, Name childName,
SessionInfo sessionInfo) throws RepositoryException {
String parentUri = uriResolver.getItemUri(parentId, sessionInfo.getWorkspaceName(), sessionInfo);
NamePathResolver resolver = getNamePathResolver(sessionInfo);
return parentUri + "/" + Text.escape(resolver.getJCRName(childName));
// JCR-2920: don't append '/' to a trailing '/'
if (!parentUri.endsWith("/")) {
parentUri += "/";
}
return parentUri + Text.escape(resolver.getJCRName(childName));
}

private NodeId getParentId(DavPropertySet propSet, SessionInfo sessionInfo)
Expand Down

0 comments on commit 6261420

Please sign in to comment.