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

java.io.File.isDirectory and lastModified fail on "x:" (win32)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Not verified

      Description



      Name: vuC71690 Date: 12/03/97


      For pathnames of the form `x:' method File.isDirectory() always
      returns false, and method File.lastModified() always returns 0.

      Here is the test that demonstrates the bug:

      ----8<---- StatTest.java ----8<----
      import java.io.File;
      class StatTest {
        public static void main (String[] args) {
          File ccwd = new File ("c:");
          System.out.println("dirp = " + ccwd.isDirectory());
          System.out.println("mtime = " + ccwd.lastModified());
        }
      }
      ----8<---- Output from StatTest ----8<----
      dirp = false
      mtime = 0

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr Mark Reinhold
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: