Changeset 29944 in osm for applications/editors/josm/plugins/imagerycache/src/org/openstreetmap
- Timestamp:
- 2013-09-23T19:18:42+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java
r29769 r29944 189 189 public void cleanStorage(String name) { 190 190 Main.info("Cleaning storage: {0}", name); 191 dbs.get(name).close(); 192 for (int t=0; t<20; t++) { 193 try { 191 Main.info("There were {0} tiles in it", storages.get(name).size()); 192 try { 193 dbs.get(name).close(); 194 dbs.remove(name); 195 storages.remove(name); 196 for (int t=0; t<20; t++) { 194 197 String fname = getDBFileName(name, t); 195 198 File f = new File(cacheFolder, fname); 196 199 if (!f.exists() || !f.canWrite()) continue; 197 200 f.delete(); 198 } catch (Exception e) { 199 Main.warn("Can not delete file"); 201 f = new File(cacheFolder, fname+".p"); 202 if (!f.exists() || !f.canWrite()) continue; 203 f.delete(); 204 f = new File(cacheFolder, fname+".lock"); 205 if (!f.exists() || !f.canWrite()) continue; 206 f.delete(); 200 207 } 201 } 208 } catch (Exception e) { Main.warn("Can not delete file, maybe it is locvked by another JOSM instance. This is not a serious error then."); } 202 209 } 203 210 }
Note:
See TracChangeset
for help on using the changeset viewer.