Details
-
Bug
-
Resolution: Fixed
-
Minor
-
4.2
-
None
-
None
Description
The code block
if (!lostfilesDir.exists()) { FileUtils.createDir(lostfilesDir); File moveTo = new File(lostfilesDir, archiveFile.getName()); archiveFile.renameTo(moveTo); movedFiles.add(moveTo); }
is wrong. The if block should only include the createDir() call.
The corresponding unit test either passes or fails depending on the order in which the two bad-files are processed, so the result is system-dependent. The fix is trivial but I'll beef up the unit test to make sure it always fails with the existing code.