Index: /applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
===================================================================
--- /applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 30461)
+++ /applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 30462)
@@ -11,4 +11,7 @@
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
@@ -289,7 +292,10 @@
                 System.err.println("TMP: "+fileTmp.getAbsolutePath());
             }
-            if (! file.renameTo(fileTmp))
-                throw new IOException(tr("Could not rename file {0} to {1}!", file, fileTmp));
-
+            try {
+                Files.move(file.toPath(), fileTmp.toPath());
+            } catch (IOException e) {
+                Main.error(tr("Could not rename file {0} to {1}!", file, fileTmp));
+                throw e;
+            }
             fileFrom = fileTmp;
             fileTo = file;
