From bc868ae7b11af61bd99a986c99e4fa358130e819 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 22 Mar 2010 14:00:49 +0000 Subject: [PATCH] Fixed fileexists checking order bug in configurator --- source/configurator/configuration.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/configurator/configuration.cpp b/source/configurator/configuration.cpp index bbaaa7bf8..0d94ab371 100644 --- a/source/configurator/configuration.cpp +++ b/source/configurator/configuration.cpp @@ -29,11 +29,10 @@ void Configuration::load(const string &path){ if(fileExists(path) == false) { 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); } - - loadStructure(path); loadValues(fileName); }