}
flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
- if (!cache->isCachedFileModified(path)) {
+ if (!cache->isCachedFileModified(path) || cache->isReadOnly()) {
return;
}
string name = nameprop->getStringValue();
_dialog_names[name] = xmlPath;
// update cached values
- cache->stampCacheFile(xmlPath);
- cache->writeStringProperty(xmlPath.str(), name);
+ if (!cache->isReadOnly()) {
+ cache->stampCacheFile(xmlPath);
+ cache->writeStringProperty(xmlPath.str(), name);
+ }
} // of directory children iteration
txn.commit();