Fix package download progress computation.
The download progress and total used to be doubles, but now they are off_t. This resulted in the division being done in integers, and always getting 0 as the result. Fixes #11940.
This commit is contained in:
parent
85b350edda
commit
3c08e45613
@ -139,7 +139,7 @@ FetchFileJob::_TransferCallback(void* _job, off_t downloadTotal,
|
||||
if (downloadTotal != 0) {
|
||||
job->fBytes = downloaded;
|
||||
job->fTotalBytes = downloadTotal;
|
||||
job->fDownloadProgress = downloaded / downloadTotal;
|
||||
job->fDownloadProgress = (float)downloaded / downloadTotal;
|
||||
job->NotifyStateListeners();
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user