Changeset 8060


Ignore:
Timestamp:
Mar 14, 2009, 7:55:24 PM (13 years ago)
Author:
livings124
Message:

when showing the stats for selected files, progress on a transfer with no selected files should be 0%, not -100%

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.h

    r7692 r8060  
    110110static TR_INLINE float tr_cpPercentDone( const tr_completion * cp )
    111111{
    112     return tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) );
     112    const double ratio = tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) );
     113    return (ratio == TR_RATIO_NA ||  ratio == TR_RATIO_INF) ? 0.0f : ratio;
    113114}
    114115
Note: See TracChangeset for help on using the changeset viewer.