fix: Prevent estimated progress from reaching 100% (#1374)

This commit is contained in:
Kroese
2026-08-11 20:08:08 +02:00
committed by GitHub
parent b39ff267f2
commit 03993aa773
+2 -2
View File
@@ -296,14 +296,14 @@ function estimateProgress(bytes) {
}
if (previousBoundary === 0) {
return Math.min(bytes / boundary * 100, 100);
return Math.min(bytes / boundary * 100, 99.9);
}
var rangeProgress =
(bytes - previousBoundary) /
(boundary - previousBoundary);
return 30 + Math.pow(rangeProgress, 2) * 70;
return Math.min(30 + Math.pow(rangeProgress, 2) * 70, 99.9);
}
function parseProgress(msg) {