#1710 the daemon will use the Application Support folder on Mac
This commit is contained in:
parent
8b722071fd
commit
fb02e9d437
|
@ -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,
|
||||
|
@ -500,6 +500,17 @@ tr_getClutchDir( const tr_session * session UNUSED )
|
|||
|
||||
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 )
|
||||
|
||||
/* SHGetFolderPath explicitly requires MAX_PATH length */
|
||||
|
@ -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…
Reference in New Issue