# HG changeset patch # User FUJIWARA Katsunori # Date 2011-12-23 15:50:56 # Node ID c604a3d1969d174f7564bb045d62863995b7dabc # Parent 9cf1620e1e75fc85f4b30cab7b3a0117c1ed44d1 icasefs: disuse length check against un-normcase()-ed filenames this patch disuses length check against un-normcase()-ed filenames gotten by "os.listdir()", because there is no assurance that filesystem stores filenames normalized except in letter case, even though some case insensitive filesystems (in some environment, for some language setting) store them in such manner. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -622,9 +622,8 @@ def fspath(name, root): The root should be normcase-ed, too. ''' def find(p, contents): - lenp = len(p) for n in contents: - if lenp == len(n) and normcase(n) == p: + if normcase(n) == p: return n return None