Changeset 24097 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-11-06T20:44:58+01:00 (14 years ago)
Author:
bastik
Message:

'applied patch by ax (JOSM ticket 5602) - photo_geotagging fails to write coordinates into image header on win32'

Location:
applications/editors/josm/plugins/photo_geotagging
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/photo_geotagging/build.xml

    r23379 r24097  
    2525
    2626        <!-- 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" />
    2828        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    2929        <property name="plugin.main.version" value="3408" />
  • applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java

    r23379 r24097  
    1414import java.util.ArrayList;
    1515import java.util.List;
     16import java.util.UUID;
    1617
    1718import javax.swing.AbstractAction;
     
    4445 */
    4546class GeotaggingAction extends AbstractAction implements LayerAction {
     47   
    4648    final static boolean debug = false;
    4749    final static String KEEP_BACKUP = "plugins.photo_geotagging.keep_backup";
     
    272274        private void chooseFilesNoBackup(File file) throws IOException {
    273275            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");
    275283            if (debug) {
    276284                System.err.println("TMP: "+fileTmp.getAbsolutePath());
Note: See TracChangeset for help on using the changeset viewer.