Changeset 24097 in osm for applications/editors/josm
- Timestamp:
- 2010-11-06T20:44:58+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/photo_geotagging
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photo_geotagging/build.xml
r23379 r24097 25 25 26 26 <!-- enter the SVN commit message --> 27 <property name="commit.message" value=" remember selection of mtime (save to preference file)" />27 <property name="commit.message" value="applied patch by ax (JOSM ticket 5602) - photo_geotagging fails to write coordinates into image header on win32" /> 28 28 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 29 29 <property name="plugin.main.version" value="3408" /> -
applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
r23379 r24097 14 14 import java.util.ArrayList; 15 15 import java.util.List; 16 import java.util.UUID; 16 17 17 18 import javax.swing.AbstractAction; … … 44 45 */ 45 46 class GeotaggingAction extends AbstractAction implements LayerAction { 47 46 48 final static boolean debug = false; 47 49 final static String KEEP_BACKUP = "plugins.photo_geotagging.keep_backup"; … … 272 274 private void chooseFilesNoBackup(File file) throws IOException { 273 275 File fileTmp; 274 fileTmp = File.createTempFile("img", ".jpg", file.getParentFile()); 276 //fileTmp = File.createTempFile("img", ".jpg", file.getParentFile()); 277 // on win32, file.renameTo(fileTmp) does not work when the destination file exists 278 // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4017593 279 // so we cannot use createTempFile(), which would create that "existing destination file" 280 // instead, let's use new File(), which doesn't actually create a file 281 // for getting a unique file name, we use UUID.randomUUID() 282 fileTmp = new File(file.getParentFile(), "img" + UUID.randomUUID() + ".jpg"); 275 283 if (debug) { 276 284 System.err.println("TMP: "+fileTmp.getAbsolutePath());
Note:
See TracChangeset
for help on using the changeset viewer.