Library: Make loading of cfg files more robust. Saw a problem to use --library=gtk when the current folder has a folder 'gtk'
This commit is contained in:
parent
7875555b03
commit
b3e6ecd827
|
@ -81,6 +81,9 @@ Library::Error Library::load(const char exename[], const char path[])
|
|||
// open file..
|
||||
tinyxml2::XMLDocument doc;
|
||||
tinyxml2::XMLError error = doc.LoadFile(path);
|
||||
if (error == tinyxml2::XML_ERROR_FILE_READ_ERROR && Path::getFilenameExtension(path).empty())
|
||||
// Reading file failed, try again...
|
||||
error = tinyxml2::XML_ERROR_FILE_NOT_FOUND;
|
||||
if (error == tinyxml2::XML_ERROR_FILE_NOT_FOUND) {
|
||||
// failed to open file.. is there no extension?
|
||||
std::string fullfilename(path);
|
||||
|
|
Loading…
Reference in New Issue