Search relative path first before install path (#2328)
This commit is contained in:
parent
83caedec8a
commit
c61880c457
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue