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

java.io.File.getParentFile() returns non directory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs
    • x86
    • windows_nt



      Name: dbT83986 Date: 05/25/99


      Given a UNC path such as \\thor\apps\java
      the sequence of parents returned is
      \\thor\apps
      \\thor
      \
      However, the last two in this sequence are not
      directories, which contradicts the documentation
      for this method. The ".." notation works to obtain
      a parent directory, but does not work to change to a different share.
      i.e.
       \\thor\apps\..\code is not a synonym for \\thor\code
      Thus for UNC paths the 'prefix' should be \\machine\share and not just the \\ part. Of course it would be easier to change the documentation ...

      I was attempting to create a portable method to determine the relative path between two absolute paths (if one exists), but the existing File
      class does not provide sufficient information about the file system to make this possible.
      (Review ID: 83441)
      ======================================================================

            Unassigned Unassigned
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: