Skip to content

Commit

Permalink
Fix folder copy error: ProviderMismatchException (halo-dev#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang authored Jan 27, 2021
1 parent c183c0b commit 96ef1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/run/halo/app/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ public static void copyFolder(@NonNull Path source, @NonNull Path target) throws
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
throws IOException {
Path current = target.resolve(source.relativize(dir));
Path current = target.resolve(source.relativize(dir).toString());
Files.createDirectories(current);
return FileVisitResult.CONTINUE;
}

@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
Files.copy(file, target.resolve(source.relativize(file)),
Files.copy(file, target.resolve(source.relativize(file).toString()),
StandardCopyOption.REPLACE_EXISTING);
return FileVisitResult.CONTINUE;
}
Expand Down

0 comments on commit 96ef1c0

Please sign in to comment.