Added ensured overwrite
This commit is contained in:
parent
c143d4803c
commit
b500fecadf
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user