Ticket #6405: cachedir.patch
| File cachedir.patch, 935 bytes (added by , 15 years ago) |
|---|
-
src/org/openstreetmap/josm/data/imagery/WmsCache.java
96 96 private Set<ProjectionBounds> areaToCache; 97 97 98 98 public WmsCache(String url, int tileSize) { 99 File globalCacheDir = new File(Main.pref.getPreferencesDir() + PROP_CACHE_PATH.get()); 99 String cacheDirPath = PROP_CACHE_PATH.get(); 100 if (!(cacheDirPath.startsWith("/") || cacheDirPath.startsWith(":/",1))) { 101 //Not an absolute path 102 cacheDirPath = Main.pref.getPreferencesDir() + cacheDirPath; 103 } 104 File globalCacheDir = new File(cacheDirPath); 100 105 globalCacheDir.mkdirs(); 101 106 cacheDir = new File(globalCacheDir, getCacheDirectory(url)); 102 107 cacheDir.mkdirs();
