Commit 6e5b5084 by Jeroen Frijters Committed by Michael Koch

2004-11-18 Jeroen Frijters <jeroen@frijters.net>

	* java/net/URLStreamHandler.java
	(parseURL): Fixed file path canonicalisation.

From-SVN: r90880
parent c521478a
......@@ -3,6 +3,11 @@
* java/net/URLStreamHandler.java
(parseURL): Fixed file path canonicalisation.
2004-11-18 Jeroen Frijters <jeroen@frijters.net>
* java/net/URLStreamHandler.java
(parseURL): Fixed file path canonicalisation.
2004-11-18 Michael Koch <konqueror@gmx.de>
* java/net/URLClassLoader.java: Whitespace cleanup.
......
......@@ -214,23 +214,9 @@ public abstract class URLStreamHandler
file = (file.substring(0, lastSlash)
+ '/' + spec.substring(start, end));
if (url.getProtocol().equals("file"))
{
// For "file" URLs constructed relative to a context, we
// need to canonicalise the file path.
try
{
boolean endsWithSlash = file.charAt(file.length() - 1) == '/';
file = new File(file).getCanonicalPath();
file = file.replace(separator, '/');
if (endsWithSlash && file.charAt(file.length() - 1) != '/')
file += '/';
}
catch (IOException e)
{
// Do nothing.
}
}
// For URLs constructed relative to a context, we
// need to canonicalise the file path.
file = canonicalizeFilename(file);
ref = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment