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

Can't select a file through symlink using a JFileChooser

    Details

    • Subcomponent:
    • Resolved In Build:
      b86
    • CPU:
      generic, x86, sparc, itanium
    • OS:
      generic, linux, solaris_8

      Description

      JFileChooser impl uses getCanonicalFile() internally during FS browsing.
      If the user has a file and a symlink, e.g.:
      /home/user/data/file.txt
      /data -> /home/user/data,
      and wants to select the file through that symlink, he can't browse there,
      because the JFileChooser will convert /data to /home/user/data
      There are legitimate uses for the need to get the user selected symlink
      instead of the canonical path to the target, example:
      The selected path may be persisted between app sessions and the user may need
      to change the target of the symlink (different version of a library, some VCS uses symlinks for paths to latest valid bits, ...)



      File.getCanonical* calls are not apparently made from JFileChooser itself, nor from FileSystemView, but are made from various FileChooserUI subclasses.
      ###@###.### 2004-07-21

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                loneid Leonid Popov (Inactive)
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: