Closed spyrkob closed 2 years ago
@spyrkob , I would prefer the second suggestion, introduce a new IoUtils.copy(Path source, Path target, boolean ignoreFailure) and existing IoUtils.copy(Path source, Path target) to call into the new one with false. The method would try to copy, but if an Exception is raised, just ignore it. We have IoUtils.recursiveDelete that ignores the file we can't delete, so would make sense. WDYT?
Yes, I think it's a simpler option. I was worried it might hide some cases where there's a genuine issue. But the only scenario I can think of is if user marks one of files generated by FP as read-only - in which case I think we shouldn't override it either way
Updated with new IoUtils#copy version
Now it should be correct. Sorry, got the previous change completely mixed up
@spyrkob , thank-you, merged.
Issue: https://issues.redhat.com/browse/GAL-335
Galleon could ignore exception when copying file that already exists (ie. was not deleted).