Fix util._statfiles_clustered() failing at root of a windows drive
Report and initial fix by Andrei Vermel <avermel@mail.ru>.
--- a/mercurial/osutil.py Sat Nov 01 13:07:24 2008 +0100
+++ b/mercurial/osutil.py Sat Nov 01 15:15:14 2008 +0300
@@ -26,7 +26,9 @@
(name, type)
'''
result = []
- prefix = path + os.sep
+ prefix = path
+ if not prefix.endswith(os.sep):
+ prefix += os.sep
names = os.listdir(path)
names.sort()
for fn in names:
--- a/mercurial/util.py Sat Nov 01 13:07:24 2008 +0100
+++ b/mercurial/util.py Sat Nov 01 15:15:14 2008 +0300
@@ -856,7 +856,7 @@
if pos == -1:
dir, base = '.', nf
else:
- dir, base = nf[:pos], nf[pos+1:]
+ dir, base = nf[:pos+1], nf[pos+1:]
cache = dircache.get(dir, None)
if cache is None:
try: