1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

don't use the convenient accessor functionality in file parsing

This commit is contained in:
Mitchell Livingston 2012-08-12 14:10:18 +00:00
parent 6fe0774147
commit 97385bcdee

View file

@ -1680,8 +1680,8 @@ int trashDataFile(const char * filename)
NSArray * pathComponents = [fullPath pathComponents]; NSArray * pathComponents = [fullPath pathComponents];
NSAssert1([pathComponents count] >= 2, @"Not enough components in path %@", fullPath); NSAssert1([pathComponents count] >= 2, @"Not enough components in path %@", fullPath);
NSString * path = pathComponents[0]; NSString * path = [pathComponents objectAtIndex: 0];
NSString * name = pathComponents[1]; NSString * name = [pathComponents objectAtIndex: 1];
if ([pathComponents count] > 2) if ([pathComponents count] > 2)
{ {
@ -1735,7 +1735,7 @@ int trashDataFile(const char * filename)
NSParameterAssert([components count] > 0); NSParameterAssert([components count] > 0);
NSParameterAssert(componentIndex < [components count]); NSParameterAssert(componentIndex < [components count]);
NSString * name = components[componentIndex]; NSString * name = [components objectAtIndex: componentIndex];
const BOOL isFolder = componentIndex < ([components count]-1); const BOOL isFolder = componentIndex < ([components count]-1);
//determine if folder node already exists //determine if folder node already exists