CID-1339965 handle retrun value on failure

This commit is contained in:
Daan Hoogland 2015-11-26 21:24:52 +01:00
parent 806807f8e6
commit 329b3a5611
1 changed files with 3 additions and 1 deletions

View File

@ -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()) {