do not add 1 to the number of pieces, let the HEAD request tell the value

head-request
Zlatin Balevsky 2021-05-24 03:52:31 +01:00
parent 1717a90020
commit d243e1cd31
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 1 additions and 3 deletions

View File

@ -398,8 +398,6 @@ class MainFrameView {
closureColumn(header : trans("REMOTE_PIECES"), type : String, read : { row ->
int pieces = row.uploader.getTotalPieces()
int done = row.uploader.getDonePieces()
if (row.uploader.getProgress() == 100)
done++
int percent = -1
if ( pieces != 0 ) {
percent = (done * 100) / pieces

View File

@ -98,7 +98,7 @@ public class UploadServlet extends HttpServlet {
this.progress = progress;
this.downloader = downloader;
this.b64 = b64;
this.remotePieces = progress == 100 ? remotePieces + 1 : remotePieces;
this.remotePieces = remotePieces;
this.totalPieces = totalPieces;
this.speed = speed;
this.browse = browse;