* 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 85631936032a8c945d91ef6d9096b82e3a2b5fc0..72ee2b10665e1e99fef8df3c1a8056621879d85d 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 12297acc4aea3b6ca6ba44c06bd684e63b5ade59..3ecd7bf037dfd4f3d7873ec8deafb334a914045c 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 ();