if it is a multifile torrent don't show the base folder
This commit is contained in:
parent
091aec4abe
commit
02274a0e60
|
@ -1068,16 +1068,22 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
{
|
{
|
||||||
int count = [self fileCount], i;
|
int count = [self fileCount], i;
|
||||||
tr_file_t file;
|
tr_file_t file;
|
||||||
NSMutableArray * files = [NSMutableArray array];
|
NSMutableArray * files = [NSMutableArray array], * pathComponents;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
file = fInfo->files[i];
|
file = fInfo->files[i];
|
||||||
|
|
||||||
[self insertPath: [[[NSString stringWithUTF8String: file.name] pathComponents] mutableCopy] withParent: files];
|
|
||||||
/*[files addObject: [NSDictionary dictionaryWithObjectsAndKeys:
|
/*[files addObject: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSString stringWithUTF8String: file.name], @"Name",
|
[NSString stringWithUTF8String: file.name], @"Name",
|
||||||
[NSNumber numberWithUnsignedLongLong: file.length], @"Size", nil]];*/
|
[NSNumber numberWithUnsignedLongLong: file.length], @"Size", nil]];*/
|
||||||
|
|
||||||
|
pathComponents = [[[NSString stringWithUTF8String: file.name] pathComponents] mutableCopy];
|
||||||
|
if (fInfo->multifile)
|
||||||
|
[pathComponents removeObjectAtIndex: 0];
|
||||||
|
|
||||||
|
[self insertPath: pathComponents withParent: files];
|
||||||
|
[pathComponents autorelease];
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue