cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [19/50] [abbrv] git commit: updated refs/heads/rbac to 9e92197
Date Tue, 04 Feb 2014 23:39:03 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/dfe744c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dfe744c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dfe744c4

Branch: refs/heads/rbac
Commit: dfe744c4a9209369204be6d51bffe87064cc1e9c
Parents: 121d887
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Thu Jan 30 13:25:30 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Thu Jan 30 13:26:00 2014 +0530

----------------------------------------------------------------------
 .../storage/resource/NfsSecondaryStorageResource.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dfe744c4/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 3d99443..7c4b8ca 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
@@ -1716,12 +1716,12 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
                 parent += File.separator;
             }
             String absoluteTemplatePath = parent + relativeTemplatePath;
-
-            File tmpltParent;
-            if(absoluteTemplatePath.endsWith(String.valueOf(obj.getId()))) {
-                tmpltParent = new File(absoluteTemplatePath);
+            File tmpltPath = new File(absoluteTemplatePath);
+            File tmpltParent = null;
+            if(tmpltPath.exists() && tmpltPath.isDirectory()) {
+                tmpltParent = tmpltPath;
             } else {
-                tmpltParent = new File(absoluteTemplatePath).getParentFile();
+                tmpltParent = tmpltPath.getParentFile();
             }
 
             String details = null;


Mime
View raw message