From a5980d56d97a0141382eadaa927f1c99e3093e0a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 14 Sep 2009 23:45:00 +0000 Subject: [PATCH] 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. --- code/sys/sys_unix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index c10a6b27..f1a18ab9 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