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,
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 )
}
}
-#else /* everyone else, follow the XDG spec */
+#else /* follow the XDG spec */
tr_list *candidates = NULL, *l;
const char * tmp;