Search relative path first before install path (#2328)

This commit is contained in:
Paul Fultz II 2019-11-05 00:09:59 -06:00 committed by Daniel Marjamäki
parent 83caedec8a
commit c61880c457
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ Library::Error Library::load(const char exename[], const char path[])
}
while (error == tinyxml2::XML_ERROR_FILE_NOT_FOUND && !cfgfolders.empty()) {
const std::string cfgfolder(cfgfolders.front());
cfgfolders.pop_front();
const std::string cfgfolder(cfgfolders.back());
cfgfolders.pop_back();
const char *sep = (!cfgfolder.empty() && endsWith(cfgfolder,'/') ? "" : "/");
const std::string filename(cfgfolder + sep + fullfilename);
error = doc.LoadFile(filename.c_str());