Changeset 4186 in josm
- Timestamp:
- 2011-06-29T20:37:48+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
r4108 r4186 30 30 import javax.imageio.ImageIO; 31 31 import javax.xml.bind.JAXBContext; 32 import javax.xml.bind.JAXBException;33 32 import javax.xml.bind.Marshaller; 34 33 import javax.xml.bind.Unmarshaller; … … 230 229 231 230 File projectionDir = new File(cacheDir, projectionEntries.cacheDirectory); 232 Set<String> referencedFiles = new HashSet<String>(); 233 234 for (CacheEntry ce: projectionEntries.entries) { 235 referencedFiles.add(ce.filename); 236 } 237 238 for (File file: projectionDir.listFiles()) { 239 if (!referencedFiles.contains(file.getName())) { 240 file.delete(); 231 if (projectionDir.exists()) { 232 Set<String> referencedFiles = new HashSet<String>(); 233 234 for (CacheEntry ce: projectionEntries.entries) { 235 referencedFiles.add(ce.filename); 236 } 237 238 for (File file: projectionDir.listFiles()) { 239 if (!referencedFiles.contains(file.getName())) { 240 file.delete(); 241 } 241 242 } 242 243 }
Note:
See TracChangeset
for help on using the changeset viewer.