mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
UploadNG: Avoid div-by-zero for super fast uploads
This commit is contained in:
parent
e10775d34f
commit
111bb485ec
1 changed files with 1 additions and 1 deletions
|
@ -365,7 +365,7 @@ void PropagateUploadFileNG::slotPutFinished()
|
|||
// target duration for each chunk upload.
|
||||
double targetDuration = propagator()->syncOptions()._targetChunkUploadDuration;
|
||||
if (targetDuration > 0) {
|
||||
double uploadTime = job->msSinceStart();
|
||||
double uploadTime = job->msSinceStart() + 1; // add one to avoid div-by-zero
|
||||
|
||||
auto predictedGoodSize = static_cast<quint64>(
|
||||
_currentChunkSize / uploadTime * targetDuration);
|
||||
|
|
Loading…
Reference in a new issue