aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-09-12 04:28:32 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-09-12 04:28:32 +0000
commit45571704cf28ce7a22e5d88318f46c369cf9e148 (patch)
treecaee22a4b452a92ea653b08664d8ad0889522dc9 /libjava
parent1a8a749c2434f9f0dd936b07a11b735694861167 (diff)
downloadgcc-45571704cf28ce7a22e5d88318f46c369cf9e148.zip
gcc-45571704cf28ce7a22e5d88318f46c369cf9e148.tar.gz
gcc-45571704cf28ce7a22e5d88318f46c369cf9e148.tar.bz2
* java/io/File.java (toURL): Use getAbsolutePath and `file://'.
From-SVN: r45556
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/java/io/File.java3
2 files changed, 6 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 8563193..72ee2b1 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java
index 12297ac..3ecd7bf 100644
--- a/libjava/java/io/File.java
+++ b/libjava/java/io/File.java
@@ -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 ();