mirror of
https://github.com/transmission/transmission
synced 2025-03-06 19:48:15 +00:00
make the long application support folder path a constant
This commit is contained in:
parent
6fc01cb59c
commit
44e1f5aa96
1 changed files with 4 additions and 4 deletions
|
@ -88,6 +88,8 @@
|
||||||
#define DOCK_SEEDING_TAG 101
|
#define DOCK_SEEDING_TAG 101
|
||||||
#define DOCK_DOWNLOADING_TAG 102
|
#define DOCK_DOWNLOADING_TAG 102
|
||||||
|
|
||||||
|
#define SUPPORT_FOLDER @"/Library/Application Support/Transmission/Transfers.plist"
|
||||||
|
|
||||||
#define WEBSITE_URL @"http://transmission.m0k.org/"
|
#define WEBSITE_URL @"http://transmission.m0k.org/"
|
||||||
#define FORUM_URL @"http://transmission.m0k.org/forum/"
|
#define FORUM_URL @"http://transmission.m0k.org/forum/"
|
||||||
#define DONATE_URL @"http://transmission.m0k.org/donate.php"
|
#define DONATE_URL @"http://transmission.m0k.org/donate.php"
|
||||||
|
@ -266,8 +268,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||||
NSLog(@"Could not IORegisterForSystemPower");
|
NSLog(@"Could not IORegisterForSystemPower");
|
||||||
|
|
||||||
//load previous transfers
|
//load previous transfers
|
||||||
NSArray * history = [[NSArray alloc] initWithContentsOfFile:
|
NSArray * history = [[NSArray alloc] initWithContentsOfFile: [NSHomeDirectory() stringByAppendingPathComponent: SUPPORT_FOLDER]];
|
||||||
[NSHomeDirectory() stringByAppendingPathComponent: @"/Library/Application Support/Transmission/Transfers.plist"]];
|
|
||||||
|
|
||||||
//old version saved transfer info in prefs file
|
//old version saved transfer info in prefs file
|
||||||
if (!history)
|
if (!history)
|
||||||
|
@ -1612,8 +1613,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||||
while ((torrent = [enumerator nextObject]))
|
while ((torrent = [enumerator nextObject]))
|
||||||
[history addObject: [torrent history]];
|
[history addObject: [torrent history]];
|
||||||
|
|
||||||
[history writeToFile: [NSHomeDirectory() stringByAppendingPathComponent:
|
[history writeToFile: [NSHomeDirectory() stringByAppendingPathComponent: SUPPORT_FOLDER] atomically: YES];
|
||||||
@"/Library/Application Support/Transmission/Transfers.plist"] atomically: YES];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) sortTorrents
|
- (void) sortTorrents
|
||||||
|
|
Loading…
Add table
Reference in a new issue