(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
1 changed files with 2 additions and 2 deletions

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; },