diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-12 04:28:32 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-12 04:28:32 +0000 |
commit | 263b58be5d2b427cafa819872d2e5806a754b756 (patch) | |
tree | caee22a4b452a92ea653b08664d8ad0889522dc9 /libjava | |
parent | 1cf12db400dfef77434ae5122d430e982c42a6fa (diff) | |
download | gcc-263b58be5d2b427cafa819872d2e5806a754b756.tar.gz |
* java/io/File.java (toURL): Use getAbsolutePath and `file://'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/java/io/File.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 85631936032..72ee2b10665 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 12297acc4ae..3ecd7bf037d 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 (); |