Changeset 2025

Show
Ignore:
Timestamp:
02/13/2010 01:36:55 PM (6 months ago)
Author:
djb61
Message:

Fix a problem in diskselection which meant the last root in the scorechart would be used regardless of the actual scores associated with the roots, removed roots were still observed due to being removed from the list in the scorechart. It looks like this bug was introduced in [1884]
See: #268

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.drftpd.slave.diskselection.filter/src/org/drftpd/slave/diskselection/filter/DiskSelectionFilter.java

    r1945 r2025  
    133133                for (RootScore rs : sc.getScoreList()) { 
    134134                        long score = rs.getScore(); 
    135                         //TODO check this! 
    136                         if (bestRoot != null && score > bestRoot.getScore()) { 
     135 
     136                        if (bestRoot == null) { 
    137137                                bestRoot = rs; 
    138                         } else { 
     138                        } else if (score > bestRoot.getScore()) { 
    139139                                bestRoot = rs; 
    140140                        }