Also replace file on first try

This commit is contained in:
Lukas Rieger (Blue) 2022-11-13 11:38:36 +01:00
parent 49ab38450e
commit 1a2d3a6d38
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class FileHelper {
*/
public static void move(Path from, Path to) throws IOException {
try {
Files.move(from, to, StandardCopyOption.ATOMIC_MOVE);
Files.move(from, to, StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING);
} catch (FileNotFoundException | NoSuchFileException ignore) {
} catch (IOException ex) {
try {