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);