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

FileUtils.copyFile methods throw an unnecessary "Failed to copy full contents from" exception

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

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

      Win x86 32 bit

      Description

      The private doCopyFile method of FileUtils does a comparison between the source and destination file sizes after the data has been copied.

      If the destination file has been removed, renamed, or otherwise no more accessible (remote share no more available) between the finally block and the size comparison the destFile.length() returns zero. If the source file is not zero bytes in size an exception with the message "Failed to copy full contents from '" + srcFile + "' to '" + destFile " will be thrown.

      Regards
      Sami

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oerlybird Sami Nieminen

              Dates

              • Created:
                Updated:

                Issue deployment