From 7a38556516e671f1d4397c154bf7b07d3f514407 Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Wed, 8 Jul 2009 18:45:03 +0200 Subject: [PATCH] Stop C4Config from forcing work dir in debug builds --- engine/src/C4Config.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/src/C4Config.cpp b/engine/src/C4Config.cpp index 57c6b194e..eeecc9242 100644 --- a/engine/src/C4Config.cpp +++ b/engine/src/C4Config.cpp @@ -652,13 +652,17 @@ void C4ConfigGeneral::DeterminePaths(BOOL forceWorkingDirectory) SCopy("/tmp/", TempPath); #endif // Force working directory to exe path if desired + +#ifndef _DEBUG if (forceWorkingDirectory) SetWorkingDirectory(ExePath); +#endif // Find system-wide data path #if defined(_WIN32) || defined(__APPLE__) - // Use exe path - SCopy(ExePath,SystemDataPath); + // Use workdir; in release builds, this is the exe dir + SCopy(GetWorkingDirectory(),SystemDataPath); + AppendBackslash(SystemDataPath); #elif defined(__linux__) // FIXME: Where to put this? SCopy(ExePath,SystemDataPath);