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

java.io.File.getCanonicalPath does not resolve final ".." in the path (solaris)

XMLWordPrintable

    • 1.1.8
    • sparc
    • solaris_2.5.1
    • Verified



        Name: mf23781 Date: 11/27/97


        The test program

        import java.io.*;

        class Test {

          public static void main (String [] args) throws Exception{
            File f = new File("/u/cockbain/java/bugs/3752/..");

            System.out.println ("CanonicalPath = " + f.getCanonicalPath());
          }
        }

        Prints out

        CanonicalPath = /u/cockbain/java/bugs/3752/..

        on Solaris but it should print out

        CanonicalPath = /u/cockbain/java/bugs

        THis works OK on Win95

        ======================================================================

              mr Mark Reinhold
              miflemi Mick Fleming
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: