DaanHoogland commented on a change in pull request #3844: ISSUE-3838: Wrong 
SSVM behavior causes redownloading for all the templates
URL: https://github.com/apache/cloudstack/pull/3844#discussion_r373464639
 
 

 ##########
 File path: 
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/template/DownloadManagerImpl.java
 ##########
 @@ -596,54 +594,54 @@ public String downloadPublicTemplate(long id, String 
url, String name, ImageForm
             File file =
                     ResourceType.TEMPLATE == resourceType ? 
_storage.getFile(tmpDir + File.separator + TemplateLocation.Filename) : 
_storage.getFile(tmpDir + File.separator +
                             "volume.properties");
-                    if (file.exists()) {
-                        if(! file.delete()) {
-                            LOGGER.warn("Deletion of file '" + 
file.getAbsolutePath() + "' failed.");
-                        }
-                    }
+            if (file.exists()) {
+                if(! file.delete()) {
+                    s_logger.warn("Deletion of file '" + 
file.getAbsolutePath() + "' failed.");
+                }
+            }
 
-                    if (!file.createNewFile()) {
-                        LOGGER.warn("Unable to create new file: " + 
file.getAbsolutePath());
-                        return "Unable to create new file: " + 
file.getAbsolutePath();
-                    }
+            if (!file.createNewFile()) {
+                s_logger.warn("Unable to create new file: " + 
file.getAbsolutePath());
 
 Review comment:
   probably due to rebase? LOGGER

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


With regards,
Apache Git Services

Reply via email to