diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2005-10-09 13:56:34 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2005-10-09 13:56:34 +0000 |
commit | 6c9a5c2aaca8c0a37a7a82c5abc0746fc7e81447 (patch) | |
tree | 04036e8c46041fcbdda7a17cb250c084ecc4008f | |
parent | 55d13e3140173f223cebacbb54017a5a1d58d73e (diff) | |
download | portage-6c9a5c2aaca8c0a37a7a82c5abc0746fc7e81447.tar.gz portage-6c9a5c2aaca8c0a37a7a82c5abc0746fc7e81447.tar.bz2 portage-6c9a5c2aaca8c0a37a7a82c5abc0746fc7e81447.zip |
cacheddir() would incorrectly return from the cache when the cached entry is less than <mtime resolution> old. Fixed by axxo.
svn path=/main/branches/2.0/; revision=2118
-rw-r--r-- | pym/portage.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index 5a4b64f51..74a37d161 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -231,7 +231,8 @@ def cacheddir(my_original_path, ignorecvs, ignorelist, EmptyOnError, followSymli if EmptyOnError: return [], [] return None, None - if mtime != cached_mtime: + # Python retuns mtime in seconds, so if it was changed in the last few seconds, it could be invalid + if mtime != cached_mtime or time.time() - mtime < 4: if dircache.has_key(mypath): cacheStale += 1 list = os.listdir(mypath) |