Fixed fileexists checking order bug in configurator

This commit is contained in:
Mark Vejvoda
2010-03-22 14:00:49 +00:00
parent d713349187
commit bc868ae7b1

View File

@@ -29,11 +29,10 @@ void Configuration::load(const string &path){
if(fileExists(path) == false) { if(fileExists(path) == false) {
throw runtime_error("Cannot find file: " + path); throw runtime_error("Cannot find file: " + path);
} }
else if(fileExists(fileName) == false) { loadStructure(path);
if(fileExists(fileName) == false) {
throw runtime_error("Cannot find file: " + fileName); throw runtime_error("Cannot find file: " + fileName);
} }
loadStructure(path);
loadValues(fileName); loadValues(fileName);
} }