Changeset 3351


Ignore:
Timestamp:
Oct 10, 2007, 5:37:51 PM (14 years ago)
Author:
livings124
Message:

remove unused object from files dict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3306 r3351  
    4444
    4545- (void) createFileList;
    46 - (void) insertPath: (NSMutableArray *) components forSiblings: (NSMutableArray *) siblings withParent: (NSMutableDictionary *) parent
    47             previousPath: (NSString *) previousPath fileSize: (uint64_t) size index: (int) index;
     46- (void) insertPath: (NSMutableArray *) components forSiblings: (NSMutableArray *) siblings previousPath: (NSString *) previousPath
     47            fileSize: (uint64_t) size index: (int) index;
    4848
    4949- (void) completenessChange: (NSNumber *) status;
     
    15071507            path = @"";
    15081508       
    1509         [self insertPath: pathComponents forSiblings: fileList withParent: nil previousPath: path fileSize: file->length index: i];
    1510         [pathComponents autorelease];
     1509        [self insertPath: pathComponents forSiblings: fileList previousPath: path fileSize: file->length index: i];
     1510        [pathComponents release];
    15111511    }
    15121512   
     
    15151515}
    15161516
    1517 - (void) insertPath: (NSMutableArray *) components forSiblings: (NSMutableArray *) siblings withParent: (NSMutableDictionary *) parent
    1518             previousPath: (NSString *) previousPath fileSize: (uint64_t) size index: (int) index
     1517- (void) insertPath: (NSMutableArray *) components forSiblings: (NSMutableArray *) siblings previousPath: (NSString *) previousPath
     1518            fileSize: (uint64_t) size index: (int) index
    15191519{
    15201520    NSString * name = [components objectAtIndex: 0];
     
    15261526        NSEnumerator * enumerator = [siblings objectEnumerator];
    15271527        while ((dict = [enumerator nextObject]))
    1528             if ([[dict objectForKey: @"IsFolder"] boolValue] && [[dict objectForKey: @"Name"] isEqualToString: name])
     1528            if ([[dict objectForKey: @"Name"] isEqualToString: name] && [[dict objectForKey: @"IsFolder"] boolValue])
    15291529                break;
    15301530    }
     
    15531553            [dict setObject: icon forKey: @"Icon"];
    15541554        }
    1555        
    1556         if (parent)
    1557             [dict setObject: parent forKey: @"Parent"];
    15581555    }
    15591556    else
     
    15631560    {
    15641561        [components removeObjectAtIndex: 0];
    1565         [self insertPath: components forSiblings: [dict objectForKey: @"Children"] withParent: dict
    1566                 previousPath: currentPath fileSize: size index: index];
     1562        [self insertPath: components forSiblings: [dict objectForKey: @"Children"] previousPath: currentPath fileSize: size
     1563                index: index];
    15671564    }
    15681565}
Note: See TracChangeset for help on using the changeset viewer.