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

JFileChooser misses to solve root-pathname without drive name, e.g. "\WINDOWS".

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.2.1
    • client-libs
    • beta2
    • x86
    • windows_95



      Name: rlT66838 Date: 06/15/99


      JFileChooser misses to solve root-pathname
      without drive name, e.g. "\WINDOWS".

      try this:

      %cd \jdk1.2.1\demo\jfc\FileChooserDemo

      %java -version
      java version "1.2.1"
      Classic VM (build JDK-1.2.1-A, native threads)

      %java -fullversion
      JAVA.EXE full version "JDK-1.2.1-A"

      %java FileChooserDemo

      1. Click [Show FileChooser] in the FileChooserDemo window.
         Then filechooser dialog appear.

      2. Enter "C:\Program Files" to file name field.
         Then the fileview change to "C:\Program Files".
         It is good.

      3. Enter "\WINDOWS" to file name field.
         Then the file chooser close a dialog and show message that
         "You chose file file: C:\Program Files\WINDOWS".
         It is not good.
         I expect to change directory to "C:\WINDOWS" in this case.

      I think that the javax.swing.filechooser.WindowsFileSystemView
      has a bug.
      The WindowsFileSystemView#createFileObject(String) should
      complement a drive name of current directory for a "\dir-name".
      (Don't complement a drive, for a UNC e.g. "\\server-name".)
      (Review ID: 84231)
      ======================================================================

            leifs Leif Samuelsson (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: