Changeset 7367 for trunk/libtransmission/platform.c
- Timestamp:
- Dec 13, 2008, 11:17:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/platform.c
r7232 r7367 409 409 410 410 const char* 411 tr_getDefaultConfigDir( void)411 tr_getDefaultConfigDir( const char * appname ) 412 412 { 413 413 static char * s = NULL; 414 415 if( !appname || !*appname ) 416 appname = "Transmission"; 414 417 415 418 if( !s ) … … 422 425 { 423 426 #ifdef SYS_DARWIN 424 s = tr_buildPath( getHomeDir( ), "Library", 425 "Application Support", "Transmission", NULL );427 s = tr_buildPath( getHomeDir( ), "Library", "Application Support", 428 appname, NULL ); 426 429 #elif defined( WIN32 ) 427 430 char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */ 428 431 SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata ); 429 s = tr_buildPath( appdata, "Transmission", NULL );432 s = tr_buildPath( appdata, appname, NULL ); 430 433 #else 431 434 if( ( s = getenv( "XDG_CONFIG_HOME" ) ) ) 432 s = tr_buildPath( s, "transmission", NULL );435 s = tr_buildPath( s, appname, NULL ); 433 436 else 434 s = tr_buildPath( getHomeDir( ), ".config", "transmission", NULL );437 s = tr_buildPath( getHomeDir( ), ".config", appname, NULL ); 435 438 #endif 436 439 }
Note: See TracChangeset
for help on using the changeset viewer.