mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix CID 1116481 Widening should happen before calculation
This commit is contained in:
parent
b9145beab6
commit
fc23c70a1f
@ -357,7 +357,7 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager
|
|||||||
|
|
||||||
int imgSizeGigs = (int)Math.ceil(_storage.getSize(td.getDownloadLocalPath()) * 1.0d / (1024 * 1024 * 1024));
|
int imgSizeGigs = (int)Math.ceil(_storage.getSize(td.getDownloadLocalPath()) * 1.0d / (1024 * 1024 * 1024));
|
||||||
imgSizeGigs++; // add one just in case
|
imgSizeGigs++; // add one just in case
|
||||||
long timeout = imgSizeGigs * installTimeoutPerGig;
|
long timeout = (long)imgSizeGigs * installTimeoutPerGig;
|
||||||
Script scr = null;
|
Script scr = null;
|
||||||
String script = resourceType == ResourceType.TEMPLATE ? createTmpltScr : createVolScr;
|
String script = resourceType == ResourceType.TEMPLATE ? createTmpltScr : createVolScr;
|
||||||
scr = new Script(script, timeout, s_logger);
|
scr = new Script(script, timeout, s_logger);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user