cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject [2/2] git commit: updated refs/heads/4.3-forward to ae22d19
Date Wed, 29 Jan 2014 08:30:54 GMT
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/ae22d199
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae22d199
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae22d199

Branch: refs/heads/4.3-forward
Commit: ae22d1990e081267fdb68b2e014153a8207083c5
Parents: f5ba6a3
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Wed Jan 29 13:52:03 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Wed Jan 29 13:52:03 2014 +0530

----------------------------------------------------------------------
 .../storage/resource/NfsSecondaryStorageResource.java         | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae22d199/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..0ce36ed 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,7 +1740,12 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
                 parent += File.separator;
             }
             String absoluteTemplatePath = parent + relativeTemplatePath;
-            File tmpltParent = new File(absoluteTemplatePath).getParentFile();
+            File tmpltParent;
+            if(absoluteTemplatePath.endsWith(String.valueOf(obj.getId()))) {
+                tmpltParent = new File(absoluteTemplatePath);
+            } else {
+                tmpltParent = new File(absoluteTemplatePath).getParentFile();
+            }
             String details = null;
             if (!tmpltParent.exists()) {
                 details = "template parent directory " + tmpltParent.getName() + " doesn't
exist";


Mime
View raw message