Commit b7403f10 by Adam King Committed by Bryce McKinlay

File.java (normalizePath): Add Win32 support for auto conversion of a '/' path…

File.java (normalizePath): Add Win32 support for auto conversion of a '/' path separator to Win32's '\'...

	* java/io/File.java (normalizePath): Add Win32 support for auto
	conversion of a '/' path separator to Win32's '\' separator.

From-SVN: r52447
parent 63501e91
2002-04-17 Adam King <aking@dreammechanics.com>
* java/io/File.java (normalizePath): Add Win32 support for auto
conversion of a '/' path separator to Win32's '\' separator.
2002-04-16 Tom Tromey <tromey@redhat.com>
Fix for PR libgcj/6081:
......
......@@ -82,6 +82,11 @@ public class File implements Serializable, Comparable
// Remove duplicate and redundant separator characters.
private String normalizePath(String p)
{
// On Windows, convert any '/' to '\'. This appears to be the same logic
// that Sun's Win32 Java performs.
if (separatorChar == '\\')
p = p.replace ('/', '\\');
int dupIndex = p.indexOf(dupSeparator);
int plen = p.length();
......
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