java.io.File.getName can return more than file name

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.1.5
    • Component/s: core-libs
    • x86
    • windows_nt



      Name: diC59631 Date: 05/26/98


      Call to File.getName() returns the full pathname
      and not only the pure filename.

      Try this

      File f = new File("a/b/c");
      System.out.println(f.getName());

      on Solaris this is fine. on win32 jdk1.1.6 you will get "a/b/c" NOT just "c" as it should

      (Review ID: 27146)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: