From 8996b30a9575c03bd8d8b47f9a4d2fc515273722 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 18 Jul 2023 10:51:41 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EC=8B=9C=20=EC=A4=91=EB=B3=B5=20=ED=8C=8C=EC=9D=BC=20=EB=8D=AE?= =?UTF-8?q?=EC=96=B4=EC=93=B0=EA=B8=B0=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/interfaces/filejob/service/bean/FileJobBean.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cokr/xit/interfaces/filejob/service/bean/FileJobBean.java b/src/main/java/cokr/xit/interfaces/filejob/service/bean/FileJobBean.java index c72bfeb..b5f675c 100644 --- a/src/main/java/cokr/xit/interfaces/filejob/service/bean/FileJobBean.java +++ b/src/main/java/cokr/xit/interfaces/filejob/service/bean/FileJobBean.java @@ -4,6 +4,7 @@ import java.io.File; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -225,7 +226,7 @@ public abstract class FileJobBean extends AbstractComponent { paths.forEach(src -> { try { Path dest = Paths.get(destDir + File.separator + src.getFileName()); - Files.move(src, dest); + Files.move(src, dest, StandardCopyOption.REPLACE_EXISTING); log().debug(src.toAbsolutePath() + " -> " + dest.toAbsolutePath()); } catch (Exception e) { throw runtimeException(e);