Ignore:
Timestamp:
Aug 5, 2012, 3:48:13 AM (9 years ago)
Author:
livings124
Message:

#5005 Torrent file deleted twice when added via url

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddWindowController.m

    r13334 r13416  
    5656- (id) initWithTorrent: (Torrent *) torrent destination: (NSString *) path lockDestination: (BOOL) lockDestination
    5757    controller: (Controller *) controller torrentFile: (NSString *) torrentFile
    58     deleteTorrent: (BOOL) deleteTorrent canToggleDelete: (BOOL) canToggleDelete
     58    deleteTorrentCheckEnableInitially: (BOOL) deleteTorrent canToggleDelete: (BOOL) canToggleDelete
    5959{
    6060    if ((self = [super initWithWindowNibName: @"AddWindow"]))
     
    6868        fTorrentFile = [[torrentFile stringByExpandingTildeInPath] retain];
    6969       
    70         fDeleteTorrentInitial = deleteTorrent;
    71         fDeleteEnableInitial = canToggleDelete;
     70        fDeleteTorrentEnableInitially = deleteTorrent;
     71        fCanToggleDelete = canToggleDelete;
    7272       
    7373        fGroupValue = [torrent groupValue];
     
    123123    [fStartCheck setState: [[NSUserDefaults standardUserDefaults] boolForKey: @"AutoStartDownload"] ? NSOnState : NSOffState];
    124124   
    125     [fDeleteCheck setState: fDeleteTorrentInitial ? NSOnState : NSOffState];
    126     [fDeleteCheck setEnabled: fDeleteEnableInitial];
     125    [fDeleteCheck setState: fDeleteTorrentEnableInitially ? NSOnState : NSOffState];
     126    [fDeleteCheck setEnabled: fCanToggleDelete];
    127127   
    128128    if (fDestination)
     
    335335    [fTorrent setGroupValue: fGroupValue];
    336336   
    337     if (fTorrentFile && [fDeleteCheck state] == NSOnState)
     337    if (fTorrentFile && fCanToggleDelete && [fDeleteCheck state] == NSOnState)
    338338        [Torrent trashFile: fTorrentFile];
    339339   
Note: See TracChangeset for help on using the changeset viewer.