cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject git commit: updated refs/heads/4.3-forward to 0e4b93c
Date Tue, 28 Jan 2014 13:48:07 GMT
Updated Branches:
  refs/heads/4.3-forward 1f4e2a51a -> 0e4b93c6c


CLOUDSTACK-5900: Failed to delete template/ISO that failed to download.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0e4b93c6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0e4b93c6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0e4b93c6

Branch: refs/heads/4.3-forward
Commit: 0e4b93c6c12f38d5418accac38fbdd28edb86a2c
Parents: 1f4e2a5
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Tue Jan 28 19:09:26 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Tue Jan 28 19:09:26 2014 +0530

----------------------------------------------------------------------
 .../resource/NfsSecondaryStorageResource.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e4b93c6/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index f90309d..8c1a7e2 100755
--- a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -1740,16 +1740,16 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
                 parent += File.separator;
             }
             String absoluteTemplatePath = parent + relativeTemplatePath;
-            File tmpltParent = new File(absoluteTemplatePath).getParentFile();
+            File tmpltDir = new File(absoluteTemplatePath);
             String details = null;
-            if (!tmpltParent.exists()) {
-                details = "template parent directory " + tmpltParent.getName() + " doesn't
exist";
+            if (!tmpltDir.exists()) {
+                details = "template parent directory " + tmpltDir.getName() + " doesn't exist";
                 s_logger.debug(details);
                 return new Answer(cmd, true, details);
             }
-            File[] tmpltFiles = tmpltParent.listFiles();
+            File[] tmpltFiles = tmpltDir.listFiles();
             if (tmpltFiles == null || tmpltFiles.length == 0) {
-                details = "No files under template parent directory " + tmpltParent.getName();
+                details = "No files under template parent directory " + tmpltDir.getName();
                 s_logger.debug(details);
             } else {
                 boolean found = false;
@@ -1776,12 +1776,12 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
                 }
 
                 if (!found) {
-                    details = "Can not find template.properties under " + tmpltParent.getName();
+                    details = "Can not find template.properties under " + tmpltDir.getName();
                     s_logger.debug(details);
                 }
             }
-            if (!tmpltParent.delete()) {
-                details = "Unable to delete directory " + tmpltParent.getName() + " under
Template path "
+            if (!tmpltDir.delete()) {
+                details = "Unable to delete directory " + tmpltDir.getName() + " under Template
path "
                         + relativeTemplatePath;
                 s_logger.debug(details);
                 return new Answer(cmd, false, details);


Mime
View raw message