Make newly-created prefpath permissions more sane.

This commit is contained in:
Ryan C. Gordon 2009-09-14 23:46:44 +00:00
parent a5980d56d9
commit cf1bb85183

View file

@ -55,14 +55,14 @@ char *Sys_DefaultHomePath(void)
Q_strncpyz( homePath, p, sizeof( homePath ) ); Q_strncpyz( homePath, p, sizeof( homePath ) );
#ifdef MACOS_X #ifdef MACOS_X
Q_strcat( homePath, sizeof( homePath ), "/Library" ); Q_strcat( homePath, sizeof( homePath ), "/Library" );
mkdir( homePath, 0777 ); /* just in case. */ mkdir( homePath, 0750 ); /* just in case. */
Q_strcat( homePath, sizeof( homePath ), "/Application Support" ); Q_strcat( homePath, sizeof( homePath ), "/Application Support" );
mkdir( homePath, 0777 ); /* just in case. */ mkdir( homePath, 0750 ); /* just in case. */
Q_strcat( homePath, sizeof( homePath ), "/Quake3" ); Q_strcat( homePath, sizeof( homePath ), "/Quake3" );
#else #else
Q_strcat( homePath, sizeof( homePath ), "/.q3a" ); Q_strcat( homePath, sizeof( homePath ), "/.q3a" );
#endif #endif
if( mkdir( homePath, 0777 ) ) if( mkdir( homePath, 0750 ) )
{ {
if( errno != EEXIST ) if( errno != EEXIST )
{ {