You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2014/01/31 03:12:36 UTC
[1/2] git commit: updated refs/heads/4.3 to a5f73b7
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 <an...@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 <sa...@citrix.com>
Authored: Wed Jan 29 13:52:03 2014 +0530
Committer: Animesh Chaturvedi <an...@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";
[2/2] git commit: updated refs/heads/4.3 to a5f73b7
Posted by an...@apache.org.
CLOUDSTACK-5900: Failed to delete template/ISO that failed to download.
(cherry picked from commit 8024f2cc70c31ab22efe574e866cc9de7a48da28)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a5f73b72
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a5f73b72
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a5f73b72
Branch: refs/heads/4.3
Commit: a5f73b7285f8bec5dd0374060d5543a32297ed04
Parents: 16dbb20
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Thu Jan 30 13:12:59 2014 +0530
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Jan 30 18:12:15 2014 -0800
----------------------------------------------------------------------
.../storage/resource/NfsSecondaryStorageResource.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5f73b72/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()) {