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

FileUtils.touch should raise an IOException if I may not modify the file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.3
    • None
    • None

    Description

      The documentation states, that FileUtils.touch implements the UNIX-touch command. However I may successfully FileUtils.touch files like /etc/passwd, which is not allowed on the shell as normal user.

      Looking at the implementation, you should propably raise an IOException if the returnvalue of `file.setLastModified(System.currentTimeMillis());` is `false`.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mfriedenhagen Mirko Friedenhagen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: