Commit c85cbd30 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Small fix in XML parser (relative path for sub-XML-file)

parent 5bb0cd68
...@@ -57,7 +57,7 @@ void XMLParser::loadMasterConfig(const std::string &filename, CrowdSimulator * c ...@@ -57,7 +57,7 @@ void XMLParser::loadMasterConfig(const std::string &filename, CrowdSimulator * c
// Location of the config file should be relative to the location of the *main* config file. // Location of the config file should be relative to the location of the *main* config file.
// Check if the main config file lies in a subfolder. // Check if the main config file lies in a subfolder.
auto endOfPath = filename.find_last_of('/'); auto endOfPath = filename.find_last_of('/');
std::string mainPath = (endOfPath == std::string::npos ? "" : filename.substr(0, endOfPath)); std::string mainPath = (endOfPath == std::string::npos ? "" : filename.substr(0, endOfPath+1));
load(mainPath + simConfigPathElt->Attribute("path"), crowdsimulator); load(mainPath + simConfigPathElt->Attribute("path"), crowdsimulator);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment