]> git.mxchange.org Git - flightgear.git/commitdiff
Reduce severity of warning for missing gui/dialogs directory
authorThomas Geymayer <tomgey@gmail.com>
Wed, 20 Mar 2013 17:02:11 +0000 (18:02 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Wed, 20 Mar 2013 17:02:11 +0000 (18:02 +0100)
src/GUI/new_gui.cxx

index eff8bbe2fb3379078c7d1531c4e33ce1dab0da30..28e463bc6b259da81838e2cb86b3e326147727c0 100644 (file)
@@ -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) {