Patch: File(URI) constructor.

Bryce McKinlay mckinlay@redhat.com
Tue Jul 6 16:50:00 GMT 2004


Anthony Green wrote:

>Well, it does the following, which is different:
>
>    // On Windows, convert any '/' to '\'.  This appears to be the same logic
>    // that Sun's Win32 Java performs.
>    if (separatorChar == '\\')
>      p = p.replace ('/', '\\');
>                                                                                                                        What happens when separatorChar is neither / nor \  ?  This is why I put my char replacement in.
>  
>

I don't know of any platform besides classic MacOS that uses a different 
separator char, and I'm certain that libgcj will never be ported to 
that. But if such a platform did exist, then we should just change the 
code in normalizePath() to do this for all separators and not just '\'.

Regards

Bryce



More information about the Java-patches mailing list