Changeset 7484


Ignore:
Timestamp:
Dec 24, 2008, 1:55:33 AM (12 years ago)
Author:
livings124
Message:

(Mac client) #1029: When removing local data only remove data from the torrent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r7483 r7484  
    5656- (void) updateAllTrackers: (NSMutableArray *) trackers;
    5757
    58 - (void) trashFile: (NSString *) path;
     58+ (void) trashFile: (NSString *) path;
    5959
    6060- (void) setTimeMachineExclude: (BOOL) exclude forPath: (NSString *) path;
     
    6666    [(Torrent *)torrentData performSelectorOnMainThread: @selector(completenessChange:)
    6767                withObject: [[NSNumber alloc] initWithInt: status] waitUntilDone: NO];
     68}
     69
     70int trashDataFile(const char * filename)
     71{
     72    [Torrent trashFile: [NSString stringWithUTF8String: filename]];
     73    return 0;
    6874}
    6975
     
    9096        }
    9197        else if (!fPublicTorrent)
    92             [self trashFile: path];
     98            [Torrent trashFile: path];
    9399        else;
    94100    }
     
    454460- (void) trashData
    455461{
    456     [self trashFile: [self dataLocation]];
     462    tr_torrentDeleteLocalData(fHandle, trashDataFile);
    457463}
    458464
     
    461467    if (fPublicTorrent)
    462468    {
    463         [self trashFile: fPublicTorrentLocation];
     469        [Torrent trashFile: fPublicTorrentLocation];
    464470        [fPublicTorrentLocation release];
    465471        fPublicTorrentLocation = nil;
     
    19691975}
    19701976
    1971 - (void) trashFile: (NSString *) path
     1977+ (void) trashFile: (NSString *) path
    19721978{
    19731979    //attempt to move to trash
Note: See TracChangeset for help on using the changeset viewer.