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

Creating a file under "Program Files" fails when should gone file virtualization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 6u10
    • core-libs
    • x86
    • windows_vista

      FULL PRODUCT VERSION :
      1.6.0_10
      1.6.0_11
      1.6.0_12_ea

      ADDITIONAL OS VERSION INFORMATION :
      Windows Vista Enterprise

      A DESCRIPTION OF THE PROBLEM :
      On windows Vista, with UAC on, "C:\Program Files" is protected. When writing to this directory, vista's file virtualization kicks in, the write does not fail, just that it's written to the VirtualStore under the user's directory. This is the behavior prior to 1.6.0_07. After 1.6.0_10, the same program would produce a "java.io.IOException: Access is denied" exception. This is a regression and a behavior change.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.io.File;
      import java.io.IOException;

      public class WindowsUAC {

      /**
      * @param args
      * @throws IOException
      */
      public static void main(String[] args) throws IOException {
      File f = new File("C:\\Program Files\\foo.txt");
      f.createNewFile();
      }

      }
      ---------- END SOURCE ----------

      Release Regression From : 6u7
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            Unassigned Unassigned
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: