Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 17668)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 17669)
@@ -14,5 +14,7 @@
 import java.io.StringWriter;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.nio.file.InvalidPathException;
+import java.nio.file.StandardCopyOption;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -448,6 +450,5 @@
 
         File tmpFile = new File(prefFile + "_tmp");
-        Utils.copyFile(tmpFile, prefFile);
-        Utils.deleteFile(tmpFile, marktr("Unable to delete temporary file {0}"));
+        Files.move(tmpFile.toPath(), prefFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
 
         setCorrectPermissions(prefFile);
