try {
readProperties(it->second.str(), result);
result->setStringValue("source", it->second.c_str());
- } catch (sg_exception& e) {
+ } catch (sg_exception&) {
SG_LOG(SG_INPUT, SG_WARN, "parse failure reading:" << it->second);
return NULL;
}
if (!path.exists())
return;
+ flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
+ flightgear::NavDataCache::Transaction txn(cache);
+
simgear::Dir dir(path);
simgear::PathList children = dir.children(simgear::Dir::TYPE_FILE |
simgear::Dir::TYPE_DIR | simgear::Dir::NO_DOT_OR_DOTDOT);
- flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
BOOST_FOREACH(SGPath path, children) {
if (path.isDir()) {
} // of cached file stamp is valid
} // of child is a file with '.xml' extension
} // of directory children iteration
+
+ txn.commit();
}
void FGDeviceConfigurationMap::readCachedData(const SGPath& path)
SGPropertyNode_ptr n(new SGPropertyNode);
try {
readProperties(path.str(), n);
- } catch (sg_exception& e) {
+ } catch (sg_exception&) {
SG_LOG(SG_INPUT, SG_WARN, "parse failure reading:" << path);
return;
}