mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5900: Failed to delete template/ISO that failed to download.
This commit is contained in:
parent
441d02dd40
commit
8024f2cc70
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue