- Timestamp:
- 2016-07-20T09:05:23+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
r10562 r10570 241 241 242 242 private static void deleteCacheFiles(String basePathPart) { 243 Utils.deleteFile (new File(basePathPart + ".key"));244 Utils.deleteFile (new File(basePathPart + ".data"));243 Utils.deleteFileIfExists(new File(basePathPart + ".key")); 244 Utils.deleteFileIfExists(new File(basePathPart + ".data")); 245 245 } 246 246 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10404 r10570 492 492 493 493 /** 494 * Deletes a file and log a default warning if the file exists but the deletion fails. 495 * @param file file to delete 496 * @return {@code true} if and only if the file does not exist or is successfully deleted; {@code false} otherwise 497 * @since 10569 498 */ 499 public static boolean deleteFileIfExists(File file) { 500 if (file.exists()) { 501 return deleteFile(file); 502 } else { 503 return true; 504 } 505 } 506 507 /** 494 508 * Deletes a file and log a default warning if the deletion fails. 495 509 * @param file file to delete
Note:
See TracChangeset
for help on using the changeset viewer.