Fix: do not show download progress if there is not content length

This commit is contained in:
Laurent Clouet
2021-05-29 16:40:21 +02:00
committed by Sheepit Renderfarm
parent 8aab044231
commit 3ffbdbb19b
2 changed files with 4 additions and 2 deletions

View File

@@ -436,7 +436,9 @@ public class Server extends Thread {
written += len;
if ((written - lastUpd) > 1000000) { // only update the gui every 1MB
gui_.status(status_, (int) (100.0 * written / size), written);
if (size != -1) { // no header for contentlength
gui_.status(status_, (int) (100.0 * written / size), written);
}
lastUpd = written;
}
}