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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.12.0
    • Utilities
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: