sureshanaparti commented on code in PR #12549:
URL: https://github.com/apache/cloudstack/pull/12549#discussion_r2764433516


##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
@@ -259,8 +259,24 @@ private List<String> getVolumePaths(List<VolumeVO> 
volumes) {
             } else {
                 volumePathPrefix = String.format("/mnt/%s", 
storagePool.getUuid());
             }
+            boolean hasBackedVolumes = backedVolumes != null && 
!backedVolumes.isEmpty();
+            if (hasBackedVolumes) {
+                Optional<Backup.VolumeInfo> opt = backedVolumes.stream()
+                        .filter(bv -> 
bv.getUuid().equals(volume.getUuid())).findFirst();
+                if (opt.isPresent()) {
+                    Backup.VolumeInfo backedVolume = opt.get();
+                    if (backedVolume.getPath() != null && 
!backedVolume.getPath().isEmpty()) {
+                        volumePaths.add(String.format("%s/%s", 
volumePathPrefix, backedVolume.getPath()));

Review Comment:
   can continue after this? no need of else



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to