1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 08:13:27 +00:00

(trunk clutch) #2003: rounding error causes web client to report 100% before done

This commit is contained in:
Charles Kerr 2009-04-22 20:40:08 +00:00
parent 577edddaea
commit 08fe5351eb

View file

@ -158,8 +158,8 @@ Torrent.prototype =
return ( this._sizeWhenDone - this._leftUntilDone ) / this._sizeWhenDone;
},
getPercentDoneStr: function() {
return Math.ratio( 100 * ( this._sizeWhenDone - this._leftUntilDone ),
this._sizeWhenDone );
return Math.ratio( 10000 * ( this._sizeWhenDone - this._leftUntilDone ),
this._sizeWhenDone ) / 100.0;
},
size: function() { return this._size; },
state: function() { return this._state; },