Changeset 7975


Ignore:
Timestamp:
Feb 28, 2009, 9:45:16 PM (12 years ago)
Author:
livings124
Message:

#1710 the daemon will use the Application Support folder on Mac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r7663 r7975  
    489489        {
    490490
    491 #ifdef SYS_DARWIN
     491#ifdef SYS_DARWIN /* on Mac, look in the app package first, before default unix directories */
    492492
    493493            CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle( ) );
     
    500500
    501501            s = tr_buildPath( appString, "Contents", "Resources", "web", NULL );
     502           
     503            if( !isClutchDir( s ) ) {
     504                tr_free( s );
     505               
     506                /* Fallback to the Application Support folder */
     507                s = tr_buildPath( tr_sessionGetConfigDir( session ), "web", NULL );
     508                if( !isClutchDir( s ) ) {
     509                    tr_free( s );
     510                    s = NULL;
     511                }
     512            }
    502513
    503514#elif defined( WIN32 )
     
    539550            }
    540551
    541 #else /* everyone else, follow the XDG spec */
     552#else /* follow the XDG spec */
    542553
    543554            tr_list *candidates = NULL, *l;
Note: See TracChangeset for help on using the changeset viewer.