mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Loop в IOHelper.move
This commit is contained in:
parent
72232e4cc7
commit
85400d968b
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue