- bugfix for scenarios to be able to use local content in the scenario folder

This commit is contained in:
Mark Vejvoda 2011-03-15 23:10:00 +00:00
parent 2c6fef4efc
commit d613e5da7b

View File

@ -727,9 +727,7 @@ vector<string> Config::getPathListForType(PathType type, string scenarioDir) {
string userData = getString("UserData_Root",""); string userData = getString("UserData_Root","");
if(userData != "") { if(userData != "") {
if(userData[userData.size()-1] != '/' && userData[userData.size()-1] != '\\') { endPathWithSlash(userData);
userData += '/';
}
//if(data_path == "") { //if(data_path == "") {
// userData = userData; // userData = userData;
//} //}
@ -771,7 +769,10 @@ vector<string> Config::getPathListForType(PathType type, string scenarioDir) {
} }
} }
if(scenarioDir != "") { if(scenarioDir != "") {
pathList.push_back(data_path+scenarioDir); //string scenarioLocation = data_path + scenarioDir;
string scenarioLocation = scenarioDir;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Scenario path [%s]\n",scenarioLocation.c_str());
pathList.push_back(scenarioLocation);
} }
switch(type) { switch(type) {