Changeset 29944 in osm
- Timestamp:
- 2013-09-23T19:18:42+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/imagerycache
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagerycache/build.xml
r29690 r29944 15 15 16 16 <!-- enter the SVN commit message --> 17 <property name="commit.message" value=" JOSM/ImageryCache: add optional imagerycache.randomAccessFile parameter for slower but less system-dependent storage"/>17 <property name="commit.message" value="[JOSM_ImageryCache]: correct database cleaning, at last"/> 18 18 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 19 19 <property name="plugin.main.version" value="5779"/> -
applications/editors/josm/plugins/imagerycache/nbproject/project.xml
r29769 r29944 17 17 </source-folder> 18 18 <source-folder> 19 <label>F:\Java\josm\core\src</label> 20 <location>F:\Java\josm\core\src</location> 21 </source-folder> 22 <source-folder> 23 <label>F:\Java\josm\core\src</label> 19 <label>src</label> 24 20 <type>java</type> 25 <location> F:\Java\josm\core\src</location>21 <location>src</location> 26 22 <encoding>UTF-8</encoding> 27 23 </source-folder> … … 48 44 <items> 49 45 <source-folder style="packages"> 50 <label> F:\Java\josm\core\src</label>51 <location> F:\Java\josm\core\src</location>46 <label>src</label> 47 <location>src</location> 52 48 </source-folder> 53 49 <source-file> … … 67 63 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3"> 68 64 <compilation-unit> 69 <package-root> F:\Java\josm\core\src</package-root>65 <package-root>src</package-root> 70 66 <classpath mode="compile">../../core/src</classpath> 71 67 <source-level>1.6</source-level> -
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.