From 34ae6bda1affde321daed5297a17c18471d87809 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 31 Aug 2011 22:40:29 +0000 Subject: [PATCH] - search in binary folder first for ini --- source/glest_game/global/config.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/glest_game/global/config.cpp b/source/glest_game/global/config.cpp index 44726c05..df34fe25 100644 --- a/source/glest_game/global/config.cpp +++ b/source/glest_game/global/config.cpp @@ -116,10 +116,15 @@ Config::Config(std::pair type, std::pair f fileName.second = getGameReadWritePath(GameConstants::path_ini_CacheLookupKey) + fileName.second; } - bool foundPath = false; + string currentpath = extractDirectoryPathFromFile(Properties::getApplicationPath()); + bool foundPath = tryCustomPath(cfgType, fileName, currentpath); + #if defined(CUSTOM_DATA_INSTALL_PATH) - foundPath = tryCustomPath(cfgType, fileName, CUSTOM_DATA_INSTALL_PATH); + if(foundPath == false) { + foundPath = tryCustomPath(cfgType, fileName, CUSTOM_DATA_INSTALL_PATH); + } #endif + // Look in standard linux shared paths for ini files #if defined(__linux__) if(foundPath == false) { @@ -137,7 +142,7 @@ Config::Config(std::pair type, std::pair f #endif if(fileMustExist.first == true && fileExists(fileName.first) == false) { - string currentpath = extractDirectoryPathFromFile(Properties::getApplicationPath()); + //string currentpath = extractDirectoryPathFromFile(Properties::getApplicationPath()); fileName.first = currentpath + fileName.first; } if(SystemFlags::VERBOSE_MODE_ENABLED) printf("-=-=-=-=-=-=-= About to load fileName.first = [%s]\n",fileName.first.c_str());