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 8024f2c
Date Thu, 30 Jan 2014 07:51:51 GMT
Updated Branches:
  refs/heads/4.3-forward 441d02dd4 -> 8024f2cc7


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/8024f2cc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8024f2cc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8024f2cc

Branch: refs/heads/4.3-forward
Commit: 8024f2cc70c31ab22efe574e866cc9de7a48da28
Parents: 441d02d
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Thu Jan 30 13:12:59 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Thu Jan 30 13:12:59 2014 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8024f2cc/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 0ce36ed..39d5b48 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,11 +1740,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;
             if (!tmpltParent.exists()) {


Mime
View raw message