diff options
author | Tom Tromey <tromey@redhat.com> | 2001-09-12 04:28:32 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-09-12 04:28:32 +0000 |
commit | 45571704cf28ce7a22e5d88318f46c369cf9e148 (patch) | |
tree | caee22a4b452a92ea653b08664d8ad0889522dc9 /libjava/java/io | |
parent | 1a8a749c2434f9f0dd936b07a11b735694861167 (diff) | |
download | gcc-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/java/io')
-rw-r--r-- | libjava/java/io/File.java | 3 |
1 files changed, 2 insertions, 1 deletions
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 (); |