]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/DiskCacheConfig.java
Version 14, October 2012
[GpsPrune.git] / tim / prune / function / DiskCacheConfig.java
index 1a4fdb19f1c7310b1613d45377abcf4d92c55f79..915bed1041bd6fdc7342c390ed70ab4575d4868c 100644 (file)
@@ -235,7 +235,12 @@ public class DiskCacheConfig extends GenericFunction
                                        I18nManager.getText(getNameKey()), JOptionPane.WARNING_MESSAGE);
                                return;
                        }
-                       // TODO: Check path is writeable too, and give warning if not
+                       // Check that the cache path is writable too, and give warning if not
+                       if (cacheDir.exists() && cacheDir.isDirectory() && !cacheDir.canWrite())
+                       {
+                               JOptionPane.showMessageDialog(_dialog, I18nManager.getText("dialog.diskcache.cannotwrite"),
+                                       I18nManager.getText(getNameKey()), JOptionPane.WARNING_MESSAGE);
+                       }
                }
                Config.setConfigString(Config.KEY_DISK_CACHE, cachePath);
                // inform subscribers so that tiles are wiped from memory and refetched