diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-07-17 19:51:30 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-07-17 19:51:49 -0600 |
commit | 2d584d7e8aaeacbcb1036bae5c8deca9b810fe60 (patch) | |
tree | 79523ed4de10b41eab189eec8c7ae74be415daba /src/configuration.cpp | |
parent | 04e4f0da4b6242f39d09794edad394587ddea620 (diff) | |
download | mana-2d584d7e8aaeacbcb1036bae5c8deca9b810fe60.tar.gz mana-2d584d7e8aaeacbcb1036bae5c8deca9b810fe60.tar.bz2 mana-2d584d7e8aaeacbcb1036bae5c8deca9b810fe60.tar.xz mana-2d584d7e8aaeacbcb1036bae5c8deca9b810fe60.zip |
Fix handing configuration files that don't exist yet
Reviewed-by: trapdoor
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r-- | src/configuration.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp index cd31fed7..d8b11034 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -141,17 +141,17 @@ void Configuration::init(const std::string &filename, bool useResManager) { XML::Document doc(filename, useResManager); + if (useResManager) + mConfigPath = "PhysFS://" + filename; + else + mConfigPath = filename; + if (!doc.rootNode()) { logger->log("Couldn't open configuration file: %s", filename.c_str()); return; } - if (useResManager) - mConfigPath = "PhysFS://" + filename; - else - mConfigPath = filename; - xmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "configuration")) |