(trunk web) #2992: "web client reports ratios of -1 and -2" -- fixed in trunk for 1.92. Thanks to Longinus00 for the patch.

This commit is contained in:
Charles Kerr
2010-02-28 14:31:45 +00:00
parent 2060557f6d
commit 14beb6f5a3

View File

@@ -551,7 +551,12 @@ Torrent.prototype =
c += ', uploaded ';
c += Math.formatBytes( this._upload_total );
c += ' (Ratio ';
c += Math.round(this._upload_ratio*100)/100;
if(this._upload_ratio > -1)
c += Math.round(this._upload_ratio*100)/100;
else if(this._upload_ratio == -2)
c += 'Inf';
else
c += '0';
c += ')';
progress_details = c;