[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: URLStreamHandler.parseURL() (was RE: Patch: more protocol fun in URL
From: |
Jeroen Frijters |
Subject: |
RE: URLStreamHandler.parseURL() (was RE: Patch: more protocol fun in URL) |
Date: |
Mon, 5 Jul 2004 17:25:35 +0200 |
Mohan Embar wrote:
> You have removed this block:
>
> -if (lastSlash < 0 && File.separatorChar != sepChar
> - && url.getProtocol().equals("file"))
> - {
> - // On Windows, even '\' is allowed in a "file" URL.
> - sepChar = File.separatorChar;
> - lastSlash = file.lastIndexOf(sepChar);
> - }
>
> ...and have replaced it with this:
>
> +int lastSlash = file.lastIndexOf('/');
>
> ...but nowhere in your patch have you changed the
> original contents of the file variable, which contains
> this backslash.
Thanks, I see what you mean now. I still disagree with it though ;-)
AFAIK, on Windows a '\' is not valid in a url, so URL.getFile() should
always return a '/' separated path. If it doesn't do that, then this
should be fixed, but I don't think the problem is here.
Regards,
Jeroen
- RE: URLStreamHandler.parseURL() (was RE: Patch: more protocol fun in URL),
Jeroen Frijters <=