Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
FileUtils.doCopyFile uses FileChannel.size() to measure the input file length at the start, and File.length() to compare the lengths at the end.
This is inconsistent.
If there is a good reason for this it should be documented, otherwise it should probably use the same method for all the checks.
[Note: is FileChannel.size() accurate if the file has not been flushed?]
Attachments
Issue Links
- relates to
-
IO-443 FileUtils.copyFile methods throw an unnecessary "Failed to copy full contents from" exception
- Resolved
-
IO-544 Should FileUtils.copyFile be flushed and synced before comparing file sizes?
- Closed
-
IO-604 FileUtils.doCopyFile(File, File, boolean) can throw ClosedByInterruptException
- Closed