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
121d88743a
commit
dfe744c4a9
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue