From 60bec150aa0619d7688668c2249c002e3dbaf25c Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Wed, 20 Mar 2013 18:02:11 +0100 Subject: [PATCH] Reduce severity of warning for missing gui/dialogs directory --- src/GUI/new_gui.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index eff8bbe2f..28e463bc6 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -290,9 +290,15 @@ NewGUI::newDialog (SGPropertyNode* props) void NewGUI::readDir (const SGPath& path) { + simgear::Dir dir(path); + if( !dir.exists() ) + { + SG_LOG(SG_INPUT, SG_INFO, "directory does not exist: " << path.str()); + return; + } + flightgear::NavDataCache* cache = flightgear::NavDataCache::instance(); flightgear::NavDataCache::Transaction txn(cache); - simgear::Dir dir(path); simgear::PathList xmls = dir.children(simgear::Dir::TYPE_FILE, ".xml"); BOOST_FOREACH(SGPath xmlPath, xmls) {