diff --git a/macosx/Controller.m b/macosx/Controller.m index 8ecb20943..b1b6ce40b 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -981,18 +981,18 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy return; } - Torrent * torrent; - if (!(torrent = [[Torrent alloc] initWithMagnetAddress: address location: nil lib: fLib])) - { - [self invalidOpenMagnetAlert: address]; - return; - } - //determine download location NSString * location = nil; if ([fDefaults boolForKey: @"DownloadLocationConstant"]) location = [[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath]; + Torrent * torrent; + if (!(torrent = [[Torrent alloc] initWithMagnetAddress: address location: location lib: fLib])) + { + [self invalidOpenMagnetAlert: address]; + return; + } + //change the location if the group calls for it (this has to wait until after the torrent is created) if ([[GroupsController groups] usesCustomDownloadLocationForIndex: [torrent groupValue]]) { diff --git a/macosx/Torrent.m b/macosx/Torrent.m index f07cb8c06..fba45f805 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -102,7 +102,6 @@ int trashDataFile(const char * filename) return self; } -#warning need location (and use it)? - (id) initWithMagnetAddress: (NSString *) address location: (NSString *) location lib: (tr_session *) lib { self = [self initWithPath: nil hash: nil torrentStruct: nil magnetAddress: address