mirror of
https://github.com/transmission/transmission
synced 2025-03-09 13:50:00 +00:00
#1710 the daemon will use the Application Support folder on Mac
This commit is contained in:
parent
8b722071fd
commit
fb02e9d437
1 changed files with 13 additions and 2 deletions
|
@ -488,7 +488,7 @@ tr_getClutchDir( const tr_session * session UNUSED )
|
|||
else
|
||||
{
|
||||
|
||||
#ifdef SYS_DARWIN
|
||||
#ifdef SYS_DARWIN /* on Mac, look in the app package first, before default unix directories */
|
||||
|
||||
CFURLRef appURL = CFBundleCopyBundleURL( CFBundleGetMainBundle( ) );
|
||||
CFStringRef appRef = CFURLCopyFileSystemPath( appURL,
|
||||
|
@ -499,6 +499,17 @@ tr_getClutchDir( const tr_session * session UNUSED )
|
|||
CFRelease( appRef );
|
||||
|
||||
s = tr_buildPath( appString, "Contents", "Resources", "web", NULL );
|
||||
|
||||
if( !isClutchDir( s ) ) {
|
||||
tr_free( s );
|
||||
|
||||
/* Fallback to the Application Support folder */
|
||||
s = tr_buildPath( tr_sessionGetConfigDir( session ), "web", NULL );
|
||||
if( !isClutchDir( s ) ) {
|
||||
tr_free( s );
|
||||
s = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined( WIN32 )
|
||||
|
||||
|
@ -538,7 +549,7 @@ tr_getClutchDir( const tr_session * session UNUSED )
|
|||
}
|
||||
}
|
||||
|
||||
#else /* everyone else, follow the XDG spec */
|
||||
#else /* follow the XDG spec */
|
||||
|
||||
tr_list *candidates = NULL, *l;
|
||||
const char * tmp;
|
||||
|
|
Loading…
Add table
Reference in a new issue