diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-14 23:45:00 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-14 23:45:00 +0000 |
commit | 76afc50977ba46b779f79074d2a69b9999df30b1 (patch) | |
tree | 1e67197be7d044af9bea4e7ff53c93e32e6e8002 | |
parent | e0f111c7c4f50e5c677d2f5892e4eb3e9ec18a79 (diff) | |
download | ioquake3-aero-76afc50977ba46b779f79074d2a69b9999df30b1.tar.gz ioquake3-aero-76afc50977ba46b779f79074d2a69b9999df30b1.zip |
Create "~/Library/Application Support" on Mac OS X if it doesn't exist.
Apparently this can happen on freshly-installed Xserves? Also, a moron user
could have dragged it to the trash anyhow.
Fixes Bugzilla #4052.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1597 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r-- | code/sys/sys_unix.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index c10a6b2..f1a18ab 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -54,7 +54,11 @@ char *Sys_DefaultHomePath(void) { Q_strncpyz( homePath, p, sizeof( homePath ) ); #ifdef MACOS_X - Q_strcat( homePath, sizeof( homePath ), "/Library/Application Support/Quake3" ); + Q_strcat( homePath, sizeof( homePath ), "/Library" ); + mkdir( homePath, 0777 ); /* just in case. */ + Q_strcat( homePath, sizeof( homePath ), "/Application Support" ); + mkdir( homePath, 0777 ); /* just in case. */ + Q_strcat( homePath, sizeof( homePath ), "/Quake3" ); #else Q_strcat( homePath, sizeof( homePath ), "/.q3a" ); #endif |