java.io.File.getParent() incorrectly returns null for "/usr"

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1
    • Component/s: core-libs
    • None
    • sparc
    • solaris_2.5.1



      Name: mc57594 Date: 02/12/97


      File still does not understand that "/" is the parent of "/usr".

      Run the following on a Solaris system:

      import java.io.File;

      class FileTest {

          public static void main(String args[]) {
      File file = new File("/usr"); // Or /anything
      System.out.println("Parent of /usr is: " + file.getParent());
          }
      }

      Output is:

      Parent of /usr is: null

      Should be:

      Parent of /usr is: /
      company - Vignette Corporation , email - ###@###.###
      ======================================================================

            Assignee:
            Mark Reinhold
            Reporter:
            Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: