Library: Handle FIlE_NOT_FOUND better

This commit is contained in:
Daniel Marjamäki 2014-06-28 10:22:35 +02:00
parent 6f2c8a8236
commit 46479ced7e
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ Library::Error Library::load(const char exename[], const char path[])
}
}
return (error == tinyxml2::XML_NO_ERROR) ? load(doc) : Error(BAD_XML);
return (error == tinyxml2::XML_NO_ERROR) ?
load(doc) :
Error(error == tinyxml2::XML_ERROR_FILE_NOT_FOUND ? FILE_NOT_FOUND : BAD_XML);
}
bool Library::loadxmldata(const char xmldata[], std::size_t len)