1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-15 16:29:34 +00:00

more block usage when removing previous piece info

This commit is contained in:
Mitchell Livingston 2012-01-07 17:40:18 +00:00
parent 61bca9fa60
commit 568ca2eb8e

View file

@ -2157,15 +2157,16 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
return objDisplay == objAll;
}];
if (index == NSNotFound)
[(Torrent *)objDisplay setPreviousFinishedPieces: nil];
if (index == NSNotFound){NSLog(@"%@",objDisplay);
[(Torrent *)objDisplay setPreviousFinishedPieces: nil];}
else
[unusedIndexesInAll removeIndex: index];
};
if ([[fDisplayedTorrents objectAtIndex: 0] isKindOfClass: [TorrentGroup class]])
for (TorrentGroup * group in fDisplayedTorrents)
[[group torrents] enumerateObjectsWithOptions: NSEnumerationConcurrent usingBlock: removePreviousFinishedPieces];
[fDisplayedTorrents enumerateObjectsWithOptions: NSEnumerationConcurrent usingBlock: ^(id obj, NSUInteger idx, BOOL * stop) {
[[(TorrentGroup *)obj torrents] enumerateObjectsWithOptions: NSEnumerationConcurrent usingBlock: removePreviousFinishedPieces];
}];
else
[fDisplayedTorrents enumerateObjectsWithOptions: NSEnumerationConcurrent usingBlock: removePreviousFinishedPieces];
}