]> granicus.if.org Git - transmission/commitdiff
use leftUntilDone instead of percentDone when determining finished status
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 13 Apr 2010 00:20:04 +0000 (00:20 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 13 Apr 2010 00:20:04 +0000 (00:20 +0000)
libtransmission/torrent.c

index 4ed7e8731dab9eb534183d4a437496ab78bc5d42..e85de623fa92b74d72974a9e42e21ab7be689975 100644 (file)
@@ -1052,7 +1052,7 @@ tr_torrentStat( tr_torrent * tor )
             break;
     }
 
-    s->finished = s->percentDone == 1.0 && checkSeedRatio && (s->ratio >= seedRatio || s->ratio == TR_RATIO_INF);
+    s->finished = !s->leftUntilDone && checkSeedRatio && (s->ratio >= seedRatio || s->ratio == TR_RATIO_INF);
 
     if( !checkSeedRatio || s->ratio >= seedRatio || s->ratio == TR_RATIO_INF )
         s->percentRatio = 1.0;