diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index 1e8aeb5d..51c7ba40 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -199,13 +199,14 @@ private MoveFileVisitor(Path from, Path to) { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { - if (!IOHelper.isDir(dir)) Files.createDirectories(dir); + Path toDir = to.resolve(from.relativize(dir)); + if (!IOHelper.isDir(toDir)) Files.createDirectories(toDir); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - IOHelper.move(file, to.resolve(from.relativize(file))); + Files.move(file, to.resolve(from.relativize(file)), COPY_OPTIONS); return FileVisitResult.CONTINUE; }