Changeset 2728


Ignore:
Timestamp:
Aug 13, 2007, 3:16:43 AM (15 years ago)
Author:
livings124
Message:

fix bug where downloads would not be added when dragging the url onto the window without a constant download location

Location:
branches/0.8x/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8x/macosx/Controller.h

    r2594 r2728  
    9797   
    9898    NSMutableArray                  * fAutoImportedNames;
     99    NSTimer                         * fAutoImportTimer;
     100   
    99101    NSMutableDictionary             * fPendingTorrentDownloads;
    100     NSTimer                         * fAutoImportTimer;
     102    NSMutableArray                  * fTempTorrentFiles;
    101103
    102104    BOOL                            fRemoteQuit;
  • branches/0.8x/macosx/Controller.m

    r2594 r2728  
    195195   
    196196    [fBadger release];
    197     if (fOverlayWindow)
    198         [fOverlayWindow release];
     197    [fOverlayWindow release];
    199198    [fIPCController release];
    200199   
    201     if (fAutoImportedNames)
    202         [fAutoImportedNames release];
    203     if (fPendingTorrentDownloads)
    204         [fPendingTorrentDownloads release];
     200    [fAutoImportedNames release];
     201    [fPendingTorrentDownloads release];
     202    [fTempTorrentFiles release];
    205203   
    206204    tr_close(fLib);
     
    542540    }
    543541   
     542    //remove all torrent files in the temporary directory
     543    if (fTempTorrentFiles)
     544    {
     545        NSEnumerator * torrentEnumerator = [fTempTorrentFiles objectEnumerator];
     546        NSString * path;
     547        while ((path = [torrentEnumerator nextObject]))
     548            [[NSFileManager defaultManager] removeFileAtPath: path handler: nil];
     549        [fTempTorrentFiles removeAllObjects];
     550    }
     551   
    544552    //stop timers
    545553    [fTimer invalidate];
     
    654662    [download release];
    655663   
    656     //delete torrent file if it wasn't already
    657     [[NSFileManager defaultManager] removeFileAtPath: path handler: nil];
     664    //delete temp torrent file on quit
     665    if (!fTempTorrentFiles)
     666        fTempTorrentFiles = [[NSMutableArray alloc] init];
     667    [fTempTorrentFiles addObject: path];
    658668}
    659669
     
    945955}
    946956
     957#warning combine
    947958- (void) openURLEndSheet: (id) sender
    948959{
Note: See TracChangeset for help on using the changeset viewer.