mirror of https://github.com/apache/cloudstack.git
CID-1339965 handle retrun value on failure
This commit is contained in:
parent
806807f8e6
commit
329b3a5611
|
|
@ -558,7 +558,9 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager
|
|||
ResourceType.TEMPLATE == resourceType ? _storage.getFile(tmpDir + File.separator + TemplateLocation.Filename) : _storage.getFile(tmpDir + File.separator +
|
||||
"volume.properties");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
if(! file.delete()) {
|
||||
s_logger.warn("Deletion of file '" + file.getAbsolutePath() + "' failed.");
|
||||
}
|
||||
}
|
||||
|
||||
if (!file.createNewFile()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue