Changeset 4108 in josm
- Timestamp:
- 2011-06-01T20:27:55+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
r4082 r4108 96 96 private Set<ProjectionBounds> areaToCache; 97 97 98 protected String cacheDirPath() { 99 String cPath = PROP_CACHE_PATH.get(); 100 if (!(cPath.startsWith("/") || cPath.startsWith(":/",1))) { 101 //Not an absolute path 102 cPath = Main.pref.getPreferencesDir() + cPath; 103 } 104 return cPath; 105 } 106 98 107 public WmsCache(String url, int tileSize) { 99 File globalCacheDir = new File( Main.pref.getPreferencesDir() + PROP_CACHE_PATH.get());108 File globalCacheDir = new File(cacheDirPath()); 100 109 globalCacheDir.mkdirs(); 101 110 cacheDir = new File(globalCacheDir, getCacheDirectory(url)); … … 110 119 try { 111 120 Properties layersIndex = new Properties(); 112 File layerIndexFile = new File( Main.pref.getPreferencesDir() + PROP_CACHE_PATH.get(), LAYERS_INDEX_FILENAME);121 File layerIndexFile = new File(cacheDirPath(), LAYERS_INDEX_FILENAME); 113 122 try { 114 123 fis = new FileInputStream(layerIndexFile);
Note:
See TracChangeset
for help on using the changeset viewer.