Mercurial > hg-stable
changeset 15719:1dd60426b061
icasefs: follow standard cache look up pattern
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 24 Dec 2011 00:51:14 +0900 |
parents | c604a3d1969d |
children | 3bcfea777efc |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sat Dec 24 00:50:56 2011 +0900 +++ b/mercurial/util.py Sat Dec 24 00:51:14 2011 +0900 @@ -640,10 +640,9 @@ result.append(sep) continue - contents = _fspathcache.get(dir, None) - if contents is None: - contents = os.listdir(dir) - _fspathcache[dir] = contents + if dir not in _fspathcache: + _fspathcache[dir] = os.listdir(dir) + contents = _fspathcache[dir] found = find(part, contents) if not found: