diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 4f6d6952a..a3d2aca15 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -1316,7 +1316,9 @@ int setupGameItemPaths(int argc, char** argv, Config *config) { if(customPathValue != "") { endPathWithSlash(customPathValue); } - pathCache[GameConstants::path_data_CacheLookupKey]=customPathValue; + pathCache[GameConstants::path_data_CacheLookupKey] = customPathValue; + Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using custom data path [%s]\n",customPathValue.c_str()); } else { @@ -1329,16 +1331,17 @@ int setupGameItemPaths(int argc, char** argv, Config *config) { else if(config != NULL) { if(config->getString("DataPath","") != "") { string customPathValue = config->getString("DataPath",""); + if(customPathValue != "") { endPathWithSlash(customPathValue); } pathCache[GameConstants::path_data_CacheLookupKey] = config->getString("DataPath",""); + Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using ini specified data path [%s]\n",config->getString("DataPath","").c_str()); } } - Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]); - //GAME_ARG_INI_PATH if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_INI_PATH]) == true) { int foundParamIndIndex = -1;