Ignore:
Timestamp:
Dec 31, 2009, 3:19:54 AM (13 years ago)
Author:
livings124
Message:

some more insignificant changes I have sitting around locally

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9822 r9842  
    12521252- (void) checkGroupValueForRemoval: (NSNotification *) notification
    12531253{
    1254     if (fGroupValue != -1 && [[[notification userInfo] objectForKey: @"Index"] intValue] == fGroupValue)
     1254    if (fGroupValue != -1 && [[[notification userInfo] objectForKey: @"Index"] integerValue] == fGroupValue)
    12551255        fGroupValue = -1;
    12561256}
     
    16151615            tr_file * file = &fInfo->files[i];
    16161616           
    1617             NSMutableArray * pathComponents = [[[NSString stringWithUTF8String: file->name] pathComponents] mutableCopy];
     1617            NSString * fullPath = [NSString stringWithUTF8String: file->name];
     1618            NSMutableArray * pathComponents = [[NSMutableArray alloc] initWithArray: [fullPath pathComponents]];
     1619            NSAssert1([pathComponents count] >= 2, @"Not enough components in path %@", fullPath);
     1620           
    16181621            NSString * path = [pathComponents objectAtIndex: 0];
    16191622            NSString * name = [pathComponents objectAtIndex: 1];
    1620             [pathComponents removeObjectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, 2)]];
    16211623           
    1622             if ([pathComponents count] > 0)
     1624            if ([pathComponents count] > 2)
    16231625            {
     1626                [pathComponents removeObjectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, 2)]];
     1627               
    16241628                //determine if folder node already exists
    16251629                FileListNode * node;
Note: See TracChangeset for help on using the changeset viewer.