forked from Qortal/qortal
Fixed bug in FilesystemUtils.copyAndReplaceDirectory()
This commit is contained in:
parent
c7d88ed95b
commit
b46c328811
@ -29,6 +29,12 @@ public class FilesystemUtils {
|
||||
throw new IOException("Destination directory doesn't exist");
|
||||
}
|
||||
|
||||
// If the destination directory isn't empty, delete its contents
|
||||
if (!FilesystemUtils.isDirectoryEmpty(destFile.toPath())) {
|
||||
FileUtils.deleteDirectory(destFile);
|
||||
destFile.mkdirs();
|
||||
}
|
||||
|
||||
Files.walk(Paths.get(sourceDirectoryLocation))
|
||||
.forEach(source -> {
|
||||
Path destination = Paths.get(destinationDirectoryLocation, source.toString()
|
||||
|
Loading…
Reference in New Issue
Block a user