--- code/sys/sys_unix.c.orig	2011-02-04 13:04:56.400235000 +0100
+++ code/sys/sys_unix.c	2011-02-19 00:03:46.000000000 +0100
@@ -59,17 +59,19 @@
 #ifdef MACOS_X
 			Q_strcat(homePath, sizeof(homePath),
 				"Library/Application Support/");
+#endif
 
 			if(com_homepath->string[0])
 				Q_strcat(homePath, sizeof(homePath), com_homepath->string);
-			else
+			else {
+#ifdef HOMEPATH
+				Q_strcat(homePath, sizeof(homePath), HOMEPATH);
+#elif defined MACOS_X
 				Q_strcat(homePath, sizeof(homePath), "Quake3");
 #else
-			if(com_homepath->string[0])
-				Q_strcat(homePath, sizeof(homePath), com_homepath->string);
-			else
 				Q_strcat(homePath, sizeof(homePath), ".q3a");
 #endif
+			}
 		}
 	}
 
