#2785 - generate the file list right away instead of lazily, since auto-grouping might rely on it

This commit is contained in:
Mitchell Livingston 2010-01-23 00:30:04 +00:00
parent 312339d3c2
commit 5cece5feb3
1 changed files with 6 additions and 6 deletions

View File

@ -1262,17 +1262,11 @@ int trashDataFile(const char * filename)
- (NSArray *) fileList
{
if (!fFileList && ![self isMagnet])
[self createFileList];
return fFileList;
}
- (NSArray *) flatFileList
{
if (!fFlatFileList && ![self isMagnet])
[self createFileList];
return fFlatFileList;
}
@ -1597,6 +1591,10 @@ int trashDataFile(const char * filename)
fWaitToStart = waitToStart && [waitToStart boolValue];
fResumeOnWake = NO;
//don't do after this point - it messes with auto-group functionality
if (![self isMagnet])
[self createFileList];
fGroupValue = groupValue ? [groupValue intValue] : [[GroupsController groups] groupIndexForTorrent: self];
@ -1746,6 +1744,8 @@ int trashDataFile(const char * filename)
{
fStat = tr_torrentStat(fHandle);
[self createFileList];
[[NSNotificationCenter defaultCenter] postNotificationName: @"ResetInspector" object: self];
}