incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r961371 - /sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java
Date Wed, 07 Jul 2010 13:37:47 GMT
Author: justin
Date: Wed Jul  7 13:37:46 2010
New Revision: 961371

URL: http://svn.apache.org/viewvc?rev=961371&view=rev
Log:
SLING-1447 - fixing relative copy/move path to remove workspace if necessary

Modified:
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java?rev=961371&r1=961370&r2=961371&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCopyMoveOperation.java
Wed Jul  7 13:37:46 2010
@@ -46,6 +46,8 @@ abstract class AbstractCopyMoveOperation
             HtmlResponse response,
             List<Modification> changes)
     throws RepositoryException {
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        
         VersioningConfiguration versioningConfiguration = getVersioningConfiguration(request);
 
         Resource resource = request.getResource();
@@ -66,12 +68,12 @@ abstract class AbstractCopyMoveOperation
             dest = ResourceUtil.getParent(source) + "/" + dest;
         }
         dest = ResourceUtil.normalize(dest);
+        dest = removeAndValidateWorkspace(dest, session);
 
         // destination parent and name
         String dstParent = trailingSlash ? dest : ResourceUtil.getParent(dest);
 
         // delete destination if already exists
-        Session session = request.getResourceResolver().adaptTo(Session.class);
         if (!trailingSlash && session.itemExists(dest)) {
 
             final String replaceString = request.getParameter(SlingPostConstants.RP_REPLACE);



Mime
View raw message