# HG changeset patch # User Patrick Mezard # Date 2008-11-01 12:15:14 # Node ID 00d76fa3ffba3c3ab006bbd03fb3e2a51da92483 # Parent 591767e6ea7aff11b04633391ac4105209aa3dbd Fix util._statfiles_clustered() failing at root of a windows drive Report and initial fix by Andrei Vermel . diff --git a/mercurial/osutil.py b/mercurial/osutil.py --- a/mercurial/osutil.py +++ b/mercurial/osutil.py @@ -26,7 +26,9 @@ def listdir(path, stat=False, skip=None) (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: diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -856,7 +856,7 @@ def _statfiles_clustered(files): 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: