Changeset 13178


Ignore:
Timestamp:
Jan 22, 2012, 5:57:55 PM (10 years ago)
Author:
livings124
Message:

use NSSearchPathForDirectoriesInDomains to retrieve the Application Support directory for config files, instead of libtransmission's hardcoded path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r13177 r13178  
    321321                                    [NSLocalizedString(@"TB", "Memory size - terabytes") UTF8String]);
    322322       
    323         const char * configDir = tr_getDefaultConfigDir("Transmission");
     323        //use this instead of tr_getDefaultConfigDir("Transmission") so we are sure to get the "real" Application Support directory
     324        const char * configDir = [[[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex: 0] stringByAppendingPathComponent: @"Transmission"] UTF8String];
    324325        fLib = tr_sessionInit("macosx", configDir, YES, &settings);
    325326        tr_bencFree(&settings);
Note: See TracChangeset for help on using the changeset viewer.