Changeset 9820


Ignore:
Timestamp:
Dec 25, 2009, 4:56:33 PM (12 years ago)
Author:
livings124
Message:

calculate proper file progress for 0-byte files (fixes #2689)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r9817 r9820  
    11261126        const uint64_t b = isSeed ? tor->info.files[i].length : fileBytesCompleted( tor, i );
    11271127        walk->bytesCompleted = b;
    1128         walk->progress = tr_getRatio( b, tor->info.files[i].length );
     1128        walk->progress = tor->info.files[i].length > 0.0 ? ( b / tor->info.files[i].length ) : 1.0;
    11291129    }
    11301130
Note: See TracChangeset for help on using the changeset viewer.