aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/URLStreamHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/net/URLStreamHandler.java')
-rw-r--r--libjava/java/net/URLStreamHandler.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/libjava/java/net/URLStreamHandler.java b/libjava/java/net/URLStreamHandler.java
index 93a8ab2..61b466c 100644
--- a/libjava/java/net/URLStreamHandler.java
+++ b/libjava/java/net/URLStreamHandler.java
@@ -196,7 +196,11 @@ public abstract class URLStreamHandler
// need to canonicalise the file path.
try
{
+ boolean endsWithSlash = file.charAt(file.length() - 1) == '/';
file = new File (file).getCanonicalPath ();
+ if (endsWithSlash
+ && file.charAt(file.length() - 1) != '/')
+ file += '/';
}
catch (IOException e)
{