DaanHoogland commented on a change in pull request #4053:
URL: https://github.com/apache/cloudstack/pull/4053#discussion_r429326862



##########
File path: 
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
##########
@@ -1347,7 +1351,11 @@ protected Answer copyFromNfsToNfs(CopyCommand cmd) {
                 retObj = newVol;
             } else if (destData.getObjectType() == DataObjectType.SNAPSHOT) {
                 SnapshotObjectTO newSnapshot = new SnapshotObjectTO();
-                newSnapshot.setPath(destData.getPath() + File.separator + 
destFile.getName());
+                if (srcFile.isFile()) {
+                    newSnapshot.setPath(destData.getPath() + File.separator + 
destFile.getName());
+                } else {
+                    newSnapshot.setPath(destData.getPath() + File.separator + 
destFile.getName() + File.separator + destFile.getName());

Review comment:
       so `./dir/file/file` without extra `.extension`!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to