From d905eba02b0ee046c084629ad11f5a016312bc16 Mon Sep 17 00:00:00 2001 From: sago007 Date: Wed, 28 Dec 2016 16:23:09 +0100 Subject: [PATCH] Wrong logic while creating "homeXdg". Also changed .local/share/openarena to .local/share/OpenArena. com_homepath will properly be permanently broken as it cannot handle two different home names. --- code/qcommon/q_shared.h | 20 ++++++++++---------- code/sys/sys_unix.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 1cd61b4f..a35d299c 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -27,16 +27,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // A user mod should never modify this file #ifdef STANDALONE - #define PRODUCT_NAME "ioq3+oa" - #define BASEGAME "baseoa" - #define CLIENT_WINDOW_TITLE "OpenArena" - #define CLIENT_WINDOW_MIN_TITLE "OA" - #define HOMEPATH_NAME_UNIX ".openarena" - #define HOMEPATH_NAME_XDG "openarena" - #define HOMEPATH_NAME_WIN "OpenArena" - #define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN - #define GAMENAME_FOR_MASTER "Quake3Arena" // must NOT contain whitespace. No servers show up if you use "openarena" - #define LEGACY_PROTOCOL 1 // OA still uses the legacy protocol + #define PRODUCT_NAME "ioq3+oa" + #define BASEGAME "baseoa" + #define CLIENT_WINDOW_TITLE "OpenArena" + #define CLIENT_WINDOW_MIN_TITLE "OA" + #define HOMEPATH_NAME_UNIX ".openarena" + #define HOMEPATH_NAME_WIN "OpenArena" + #define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN + #define HOMEPATH_NAME_XDG HOMEPATH_NAME_WIN + #define GAMENAME_FOR_MASTER "Quake3Arena" // must NOT contain whitespace. No servers show up if you use "openarena" + #define LEGACY_PROTOCOL 1 // OA still uses the legacy protocol #else #define PRODUCT_NAME "ioq3" #define BASEGAME "baseq3" diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index 51836aaf..e6248b07 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -150,7 +150,7 @@ static void CreateXDGPathAndMisc( void ) { Com_Printf("Failed to move \"%s\" to \"%s\". Error code: %d. Non fatal.", homeClassic, homeXdg, errCode); } } - if (Sys_IsDir(homeXdg)) { + if (!Sys_IsDir(homeXdg)) { int errCode = Sys_Mkdir(homeXdg); if (errCode) { Com_Printf("Failed to create \"%s\". Error code: %d. This is quite bad.", homeXdg, errCode);