Changeset 17669 in josm
- Timestamp:
- 2021-03-26T21:07:11+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r17541 r17669 14 14 import java.io.StringWriter; 15 15 import java.nio.charset.StandardCharsets; 16 import java.nio.file.Files; 16 17 import java.nio.file.InvalidPathException; 18 import java.nio.file.StandardCopyOption; 17 19 import java.util.ArrayList; 18 20 import java.util.Arrays; … … 448 450 449 451 File tmpFile = new File(prefFile + "_tmp"); 450 Utils.copyFile(tmpFile, prefFile); 451 Utils.deleteFile(tmpFile, marktr("Unable to delete temporary file {0}")); 452 Files.move(tmpFile.toPath(), prefFile.toPath(), StandardCopyOption.REPLACE_EXISTING); 452 453 453 454 setCorrectPermissions(prefFile);
Note:
See TracChangeset
for help on using the changeset viewer.