* java/io/File.java (toURL): Use getAbsolutePath and `file://'.
authorTom Tromey <tromey@redhat.com>
Wed, 12 Sep 2001 04:28:32 +0000 (04:28 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 12 Sep 2001 04:28:32 +0000 (04:28 +0000)
From-SVN: r45556

libjava/ChangeLog
libjava/java/io/File.java

index 8563193..72ee2b1 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-11  Tom Tromey  <tromey@redhat.com>
+
+       * java/io/File.java (toURL): Use getAbsolutePath and `file://'.
+
 2001-09-10  Tom Tromey  <tromey@redhat.com>
 
        * java/util/Properties.java (load): Correctly read \u sequences.
index 12297ac..3ecd7bf 100644 (file)
@@ -281,7 +281,8 @@ public class File implements Serializable, Comparable
 
   public URL toURL () throws MalformedURLException
   {
-    return new URL ("file:" + path + (isDirectory() ? "/" : ""));
+    return new URL ("file://" + getAbsolutePath ()
+                   + (isDirectory() ? "/" : ""));
   }
 
   private final native boolean performMkdir ();