Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6728842

File.setReadOnly does not make a directory read-only (win)

XMLWordPrintable

    • b116
    • generic
    • generic
    • Verified

        File's setReadOnly method [Also setWritable(false)] does not make a directory read-only on Windows. Instead, it sets the DOS readonly attribute that prevents the directory from being deleted.

        This method should be investigated to see if the following are feasible:

        1. Have these methods return false for directories (meaning they cannot make the directory readonly)

        2. Have the method insert a deny entry at the top of the DACL to deny write access.

              alanb Alan Bateman
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: