Index: Lib/javapath.py =================================================================== --- Lib/javapath.py (revision 3226) +++ Lib/javapath.py (working copy) @@ -8,7 +8,6 @@ # Incompletely implemented: # islink -- How? # ismount -- How? -# normcase -- How? # Missing: # sameopenfile -- Java doesn't have fstat nor file descriptors? @@ -60,6 +59,7 @@ "(root, ext)", either part may be empty. """ + path = _tostr(path, "splitext") i = 0 n = -1 for c in path: @@ -119,13 +119,11 @@ return f.getPath() def normcase(path): - """Normalize case of pathname. - - XXX Not done right under JDK. - - """ + """Normalize case of pathname.""" path = _tostr(path, "normcase") - return File(path).getPath() + if _CASE_INSENSITIVE: + path = path.lower() + return path def commonprefix(m): "Given a list of pathnames, return the longest common leading component" @@ -346,4 +344,4 @@ return res - +_CASE_INSENSITIVE = samefile('foo', 'FOO')