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

File.getCanonicalPath does not resolve terminal symbolic link (win)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 25
    • core-libs
    • None
    • generic
    • windows

      Given a symbolic link "symlink" whose target is a directory "dir" as with

      C:\Users\bpb\dev\bugs\symlink -> C:\Users\bpb\dev\bugs\dir

      and "subdir" is a sub-directory of "dir", then

      jshell> new File("symlink").getCanonicalPath()
      $2 ==> C:\\Users\\bpb\\dev\\bugs\\symlink

      but

      jshell> new File("symlink", "subdir").getCanonicalPath()
      $3 ==> "C:\\Users\\bpb\\dev\\bugs\\dir\\subdir"

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: