Added ensured overwrite
This commit is contained in:
@@ -15,6 +15,11 @@ public class ApacheCommonsIOSynchroniser implements Synchroniser {
|
||||
source = Path.of(root.getPath(), dest.getPath()).toFile();
|
||||
}
|
||||
|
||||
if (source.exists() && dest.exists()) {
|
||||
dest.delete();
|
||||
// Fixes an issue where sometimes, Apache Commons IO will fail to overwrite.
|
||||
}
|
||||
|
||||
if (source.isDirectory()) {
|
||||
if (dest.isDirectory()) {
|
||||
FileUtils.copyDirectory(source, dest);
|
||||
|
Reference in New Issue
Block a user