mirror of https://github.com/apache/cloudstack.git
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:
commit
39a4a9d196
|
|
@ -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