From cd05b22c50cb6638f97c9dec22f9de19ed8c1fa6 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 10 Jun 2011 21:18:22 +0000 Subject: [PATCH] - ensure datapath has backslash --- source/glest_game/main/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 6a274cc10..4e0b42cfa 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -1084,6 +1084,9 @@ int setupGameItemPaths(int argc, char** argv, Config *config) { Tokenize(customPath,paramPartTokens,"="); if(paramPartTokens.size() >= 2 && paramPartTokens[1].length() > 0) { string customPathValue = paramPartTokens[1]; + if(customPathValue != "") { + endPathWithSlash(customPathValue); + } pathCache[GameConstants::path_data_CacheLookupKey]=customPathValue; if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using custom data path [%s]\n",customPathValue.c_str()); } @@ -1096,6 +1099,10 @@ 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",""); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using ini specified data path [%s]\n",config->getString("DataPath","").c_str()); }