Changeset 2729


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

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r2698 r2729  
    314314                4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
    315315                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
    316                 8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
     316                8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
    317317                A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
    318318                A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
  • trunk/macosx/Controller.h

    r2676 r2729  
    9797   
    9898    NSMutableArray                  * fAutoImportedNames;
     99    NSTimer                         * fAutoImportTimer;
     100   
    99101    NSMutableDictionary             * fPendingTorrentDownloads;
    100     NSTimer                         * fAutoImportTimer;
     102    NSMutableArray                  * fTempTorrentFiles;
    101103
    102104    BOOL                            fRemoteQuit;
  • trunk/macosx/Controller.m

    r2727 r2729  
    199199    [fAutoImportedNames release];
    200200    [fPendingTorrentDownloads release];
     201    [fTempTorrentFiles release];
    201202   
    202203    tr_close(fLib);
     
    542543    }
    543544   
     545    //remove all torrent files in the temporary directory
     546    if (fTempTorrentFiles)
     547    {
     548        NSEnumerator * torrentEnumerator = [fTempTorrentFiles objectEnumerator];
     549        NSString * path;
     550        while ((path = [torrentEnumerator nextObject]))
     551            [[NSFileManager defaultManager] removeFileAtPath: path handler: nil];
     552        [fTempTorrentFiles removeAllObjects];
     553    }
     554   
    544555    //stop timers
    545556    [fTimer invalidate];
     
    654665    [download release];
    655666   
    656     //delete torrent file if it wasn't already
    657     [[NSFileManager defaultManager] removeFileAtPath: path handler: nil];
     667    //delete temp torrent file on quit
     668    if (!fTempTorrentFiles)
     669        fTempTorrentFiles = [[NSMutableArray alloc] init];
     670    [fTempTorrentFiles addObject: path];
    658671}
    659672
     
    945958}
    946959
     960#warning combine
    947961- (void) openURLEndSheet: (id) sender
    948962{
Note: See TracChangeset for help on using the changeset viewer.