Added support for hardcoded HOMEPATH.

Partially fixes Bugzilla #4271.
This commit is contained in:
Ryan C. Gordon 2009-09-15 06:40:55 +00:00
parent 826f05f95f
commit 9fd5e15b97

View file

@ -54,7 +54,9 @@ char *Sys_DefaultHomePath(void)
if( ( p = getenv( "HOME" ) ) != NULL ) if( ( p = getenv( "HOME" ) ) != NULL )
{ {
Q_strncpyz( homePath, p, sizeof( homePath ) ); Q_strncpyz( homePath, p, sizeof( homePath ) );
#ifdef MACOS_X #ifdef HOMEPATH
Q_strcat( homePath, sizeof( homePath ), HOMEPATH );
#elif defined(MACOS_X)
Q_strcat( homePath, sizeof( homePath ), "/Library" ); Q_strcat( homePath, sizeof( homePath ), "/Library" );
mkdir( homePath, 0750 ); /* just in case. */ mkdir( homePath, 0750 ); /* just in case. */
Q_strcat( homePath, sizeof( homePath ), "/Application Support" ); Q_strcat( homePath, sizeof( homePath ), "/Application Support" );