make the blocklist compatible with tiger

This commit is contained in:
Mitchell Livingston 2008-03-30 02:00:05 +00:00
parent 66e9879e23
commit 06832b7647
1 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#import "BlocklistDownloader.h"
#import "PrefsController.h"
#import "NSStringAdditions.h"
#import "NSApplicationAdditions.h"
#define LIST_URL @"http://download.m0k.org/transmission/files/level1.gz"
#define DESTINATION [NSTemporaryDirectory() stringByAppendingPathComponent: @"level1.gz"]
@ -114,7 +115,10 @@
tr_blocklistSetContent(fHandle, [DESTINATION UTF8String]);
//delete downloaded file
[[NSFileManager defaultManager] removeItemAtPath: DESTINATION error: NULL];
if ([NSApp isOnLeopardOrBetter])
[[NSFileManager defaultManager] removeItemAtPath: DESTINATION error: NULL];
else
[[NSFileManager defaultManager] removeFileAtPath: DESTINATION handler: nil];
[fPrefsController updateBlocklistFields];