From f7c130d66e58b7e22fcf9a9952b8be04370e8a6a Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 3 Dec 2024 21:46:46 +0100 Subject: [PATCH] Fix FileAccess#move and FileAccess#copy --- .../de/staropensource/engine/base/utility/FileAccess.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java index 841a35e..fc92d28 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java @@ -699,7 +699,7 @@ public final class FileAccess { * @since v1-alpha9 */ public @NotNull FileAccess move(@NotNull FileAccess destination) throws IOException { - Files.move(path, destination.path); + Files.move(path, destination.path, StandardCopyOption.REPLACE_EXISTING); return destination; } @@ -712,7 +712,7 @@ public final class FileAccess { * @since v1-alpha9 */ public @NotNull FileAccess copy(@NotNull FileAccess destination) throws IOException { - Files.move(path, destination.path); + Files.copy(path, destination.path, StandardCopyOption.REPLACE_EXISTING); return this; }