Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
FileUtils.doCopyFile caches the input file size and only exits the loop once it has read sufficient bytes.
If the input file is truncated after obtaining the file size, the loop might never exit.
One possible way round this might be to check whether anything has been transferred. However, I don't know if it's possible for FileChannel.transferFrom() to temporarily return 0 when there is data available; if so that could cause some existing applications to break.
Attachments
Issue Links
- relates to
-
IO-383 FileUtils.doCopyFile caches the file size; needs to be documented
- Closed