incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1520580 - /sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java
Date Fri, 06 Sep 2013 14:36:20 GMT
Author: rombert
Date: Fri Sep  6 14:36:19 2013
New Revision: 1520580

URL: http://svn.apache.org/r1520580
Log:
SLING-2989 - [Tooling] integrate with vlt once available

Fix directory creation

Modified:
    sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java

Modified: sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java
URL: http://svn.apache.org/viewvc/sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java?rev=1520580&r1=1520579&r2=1520580&view=diff
==============================================================================
--- sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java
(original)
+++ sling/branches/tooling-ide-vlt/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/AddNodeCommand.java
Fri Sep  6 14:36:19 2013
@@ -57,7 +57,10 @@ public class AddNodeCommand extends JcrC
             node = session.getNode(getPath());
         } else {
 
-            String parentLocation = Text.getAbsoluteParent(getPath(), 1);
+            String parentLocation = Text.getRelativeParent(getPath(), 1);
+            if (parentLocation.isEmpty()) {
+                parentLocation = "/";
+            }
             if ( !session.nodeExists(parentLocation)) {
                 throw new RepositoryException("No parent found at " + parentLocation
                         + " ; it's needed to create node at " + getPath());



Mime
View raw message