Loading src/main/java/it/inaf/oats/vospace/CopyService.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ public class CopyService extends AbstractNodeService { throw new IllegalArgumentException("Cannot copy node to a subdirectory of its own path"); } // Check if destination equals parent path of source if(NodeUtils.getParentPath(sourcePath).equals(destinationPath)){ throw new IllegalArgumentException("Cannot duplicate node at same path without renaming it"); } try { // check source branch for read and lock it Loading src/main/java/it/inaf/oats/vospace/MoveService.java +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ public class MoveService extends AbstractNodeService { throw new IllegalArgumentException("Cannot move node to a subdirectory of its own path"); } // Check if destination equals parent path of source if(NodeUtils.getParentPath(sourcePath).equals(destinationPath)){ return; } try { // Get source node Optional<Long> sourceIdOpt = nodeDao.getNodeId(sourcePath); Loading Loading
src/main/java/it/inaf/oats/vospace/CopyService.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ public class CopyService extends AbstractNodeService { throw new IllegalArgumentException("Cannot copy node to a subdirectory of its own path"); } // Check if destination equals parent path of source if(NodeUtils.getParentPath(sourcePath).equals(destinationPath)){ throw new IllegalArgumentException("Cannot duplicate node at same path without renaming it"); } try { // check source branch for read and lock it Loading
src/main/java/it/inaf/oats/vospace/MoveService.java +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ public class MoveService extends AbstractNodeService { throw new IllegalArgumentException("Cannot move node to a subdirectory of its own path"); } // Check if destination equals parent path of source if(NodeUtils.getParentPath(sourcePath).equals(destinationPath)){ return; } try { // Get source node Optional<Long> sourceIdOpt = nodeDao.getNodeId(sourcePath); Loading