Fix for PR libgcj/4481:
* java/io/File.java (getParent): Handle case where path is "/".
(normalizePath): Use correct string for UNC leader.
From-SVN: r46093
+2001-10-08 Tom Tromey <tromey@redhat.com>
+
+ Fix for PR libgcj/4481:
+ * java/io/File.java (getParent): Handle case where path is "/".
+ (normalizePath): Use correct string for UNC leader.
+
2001-10-06 Mark Wielaard <mark@klomp.org>
* java/io/BufferedInputStream.java: Merge with Classpath
{
int dupIndex = p.indexOf(dupSeparator);
int plen = p.length();
-
+
// Special case: permit Windows UNC path prefix.
- if (dupSeparator.equals("\\") && dupIndex == 0)
+ if (dupSeparator.equals("\\\\") && dupIndex == 0)
dupIndex = p.indexOf(dupSeparator, 1);
if (dupIndex == -1)
int last = path.lastIndexOf(separatorChar);
if (last == -1)
return null;
+ // FIXME: POSIX assumption.
+ if (last == 0 && path.charAt (0) == '/')
+ ++last;
return path.substring(0, last);
}