]> git.mxchange.org Git - flightgear.git/commitdiff
Read-only mode fixes.
authorJames Turner <zakalawe@mac.com>
Mon, 18 Nov 2013 15:40:14 +0000 (15:40 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 18 Nov 2013 15:40:14 +0000 (15:40 +0000)
src/Airports/xmlloader.cxx
src/GUI/new_gui.cxx

index 59a9ca9693d6fc3ae8a0118ab9d9169454907ebf..8291358b416230263885c34fce274a8bcf39ad24 100644 (file)
@@ -50,7 +50,7 @@ void XMLLoader::load(FGAirportDynamics* d)
   }
 
   flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
-  if (!cache->isCachedFileModified(path)) {
+  if (!cache->isCachedFileModified(path) || cache->isReadOnly()) {
     return;
   }
   
index ca1c2f50d593a3d3bd00b40355765d046dc9475c..af073812173e1ad22587a82dce047778a5e7d687 100644 (file)
@@ -339,8 +339,10 @@ NewGUI::readDir (const SGPath& path)
       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();