Changeset 30457 in osm for applications
- Timestamp:
- 2014-05-19T15:25:04+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
r30355 r30457 1 //License: GPL (v2 or above)1 //License: GPL (v2 or later) 2 2 package org.openstreetmap.josm.plugins.photo_geotagging; 3 3 … … 283 283 // instead, let's use new File(), which doesn't actually create a file 284 284 // for getting a unique file name, we use UUID.randomUUID() 285 fileTmp = new File(file.getParentFile(), "img" + UUID.randomUUID() + ".jpg"); 285 do { 286 fileTmp = new File(file.getParentFile(), "img" + UUID.randomUUID() + ".jpg"); 287 } while (fileTmp.exists()); 286 288 if (debug) { 287 289 System.err.println("TMP: "+fileTmp.getAbsolutePath()); 288 290 } 289 291 if (! file.renameTo(fileTmp)) 290 throw new IOException(tr("Could not rename file !"));292 throw new IOException(tr("Could not rename file {0} to {1}!", file, fileTmp)); 291 293 292 294 fileFrom = fileTmp;
Note:
See TracChangeset
for help on using the changeset viewer.