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

Wrong logging in FileUtils.setLastModified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Implemented
    • 2.8.0
    • None
    • None
    • None

    Description

      We run into a small issue with FileUtils.copyDirectory(File srcDir, File destDir).

       

      The javadoc is wrong, setting preserveFileDate=true will now result in an IOException if the operation fails. Issue IO-695 already exists for that.

       

      org.apache.commons.io.FileUtils.setLastModified(File, File) sets the lastModified of the targetFile, but the IOException logs "failed setLastModified on sourceFile".

      The setter failed on targetFile - so it should log the targetFile?

      Attachments

        Activity

          People

            Unassigned Unassigned
            tproko tza
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: