Changeset 6211


Ignore:
Timestamp:
Jun 17, 2008, 2:25:23 PM (13 years ago)
Author:
charles
Message:

small tr_torrentStat() speedup suggested by BentMyWookie?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r6199 r6211  
    734734    s->sizeWhenDone = tr_cpSizeWhenDone( tor->completion );
    735735
    736     s->recheckProgress =
    737         1.0 - (tr_torrentCountUncheckedPieces( tor ) / (double) tor->info.pieceCount);
     736    s->recheckProgress = s->status == TR_STATUS_CHECK
     737        ? 1.0 - (tr_torrentCountUncheckedPieces( tor ) / (double) tor->info.pieceCount)
     738        : 0.0;
    738739
    739740    tr_torrentGetRates( tor, &s->rateDownload, &s->rateUpload );
Note: See TracChangeset for help on using the changeset viewer.