]> granicus.if.org Git - transmission/commitdiff
#3743 properly set the blocklist URL on launch
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 14 Nov 2010 23:44:07 +0000 (23:44 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 14 Nov 2010 23:44:07 +0000 (23:44 +0000)
macosx/Controller.m

index 860e0c53d40b56982e9d93a5741609fa6d066a5f..0878602eb50daecf3caaf3a885f6ca897ed750eb 100644 (file)
@@ -296,7 +296,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
             tr_bencDictAddStr(&settings, TR_PREFS_KEY_BIND_ADDRESS_IPV6, [[fDefaults stringForKey: @"BindAddressIPv6"] UTF8String]);
         
         tr_bencDictAddBool(&settings, TR_PREFS_KEY_BLOCKLIST_ENABLED, [fDefaults boolForKey: @"BlocklistNew"]);
-        tr_bencDictAddBool(&settings, TR_PREFS_KEY_BLOCKLIST_URL, [[fDefaults stringForKey: @"BlocklistURL"] UTF8String]);
+        if ([fDefaults objectForKey: @"BlocklistURL"])
+            tr_bencDictAddStr(&settings, TR_PREFS_KEY_BLOCKLIST_URL, [[fDefaults stringForKey: @"BlocklistURL"] UTF8String]);
         tr_bencDictAddBool(&settings, TR_PREFS_KEY_DHT_ENABLED, [fDefaults boolForKey: @"DHTGlobal"]);
         tr_bencDictAddStr(&settings, TR_PREFS_KEY_DOWNLOAD_DIR, [[[fDefaults stringForKey: @"DownloadFolder"]
                                                                     stringByExpandingTildeInPath] UTF8String]);