jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1082620 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Date Thu, 17 Mar 2011 18:28:23 GMT
Author: stefan
Date: Thu Mar 17 18:28:23 2011
New Revision: 1082620

URL: http://svn.apache.org/viewvc?rev=1082620&view=rev
Log:
JCR-2920: Workspace.copy(src, dest) throws unexpected RepositoryException ("Invalid path")

Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=1082620&r1=1082619&r2=1082620&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Thu Mar 17 18:28:23 2011
@@ -410,7 +410,11 @@ public class RepositoryServiceImpl imple
                               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)



Mime
View raw message