mirror of
https://github.com/transmission/transmission
synced 2025-03-16 00:39:34 +00:00
fix path bug from r14034
This commit is contained in:
parent
9ee681355d
commit
6330b49112
1 changed files with 5 additions and 1 deletions
|
@ -1726,7 +1726,7 @@ int trashDataFile(const char * filename)
|
|||
const NSInteger count = [self fileCount];
|
||||
NSMutableArray * flatFileList = [NSMutableArray arrayWithCapacity: count];
|
||||
|
||||
FileListNode * tempNode = [[FileListNode alloc] initWithFolderName:nil path:nil torrent:self];
|
||||
FileListNode * tempNode = nil;
|
||||
|
||||
for (NSInteger i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -1734,6 +1734,10 @@ int trashDataFile(const char * filename)
|
|||
|
||||
NSString * fullPath = [NSString stringWithUTF8String: file->name];
|
||||
NSArray * pathComponents = [fullPath pathComponents];
|
||||
|
||||
if (!tempNode)
|
||||
tempNode = [[FileListNode alloc] initWithFolderName:[pathComponents objectAtIndex: 0] path:@"" torrent:self];
|
||||
|
||||
[self insertPathForComponents: pathComponents withComponentIndex: 1 forParent: tempNode fileSize: file->length index: i flatList: flatFileList];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue