Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-544

Should FileUtils.copyFile be flushed and synced before comparing file sizes?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Utilities
    • Labels:
      None
    • Environment:

      Win Server 2008, x86

      Description

      I've been struggling to troubleshoot intermittent IOExceptions thrown from FileUtils.doCopyFile when copying 2-4KB files from a local temporary file to a network drive. Despite the error, the file appears on the network drive when I check. Should the output channel/buffer be forced/flushed before closing, and synchronized before comparing the file lengths? It's a rather intermittent issue on a relatively high throughput PC so I'd expect there to be more IO latency than normal.

      I found myself referencing:

      Thanks,
      Sean

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                seanpltr Sean Poulter
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: