1
0
Fork 0

Reduce severity of warning for missing gui/dialogs directory

This commit is contained in:
Thomas Geymayer 2013-03-20 18:02:11 +01:00
parent 9575783491
commit 60bec150aa

View file

@ -290,9 +290,15 @@ NewGUI::newDialog (SGPropertyNode* props)
void void
NewGUI::readDir (const SGPath& path) 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* cache = flightgear::NavDataCache::instance();
flightgear::NavDataCache::Transaction txn(cache); flightgear::NavDataCache::Transaction txn(cache);
simgear::Dir dir(path);
simgear::PathList xmls = dir.children(simgear::Dir::TYPE_FILE, ".xml"); simgear::PathList xmls = dir.children(simgear::Dir::TYPE_FILE, ".xml");
BOOST_FOREACH(SGPath xmlPath, xmls) { BOOST_FOREACH(SGPath xmlPath, xmls) {