Merge pull request #1129 from DaanHoogland/CID-1339965

CID-1339965 handle return value on failurecoverity reported this as new last week. It has been in the code for ever, i.e. since initial git commit. Minor issue, easy fix.

* pr/1129:
  CID-1339965 handle retrun value on failure

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-11-28 18:47:44 +01:00
commit 39a4a9d196
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()) {