cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [1/2] git commit: updated refs/heads/4.3 to a5f73b7
Date Fri, 31 Jan 2014 02:12:36 GMT
Updated Branches:
  refs/heads/4.3 e089b9138 -> a5f73b728


CLOUDSTACK-5900: Failed to delete template/ISO that failed to download.
(cherry picked from commit ae22d1990e081267fdb68b2e014153a8207083c5)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>


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

Branch: refs/heads/4.3
Commit: 16dbb20b5deecea5976b72d38540992b7f182658
Parents: e089b91
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Wed Jan 29 13:52:03 2014 +0530
Committer: Animesh Chaturvedi <animesh@apache.org>
Committed: Thu Jan 30 18:11:47 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16dbb20b/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