diff --git a/Lib/mailbox.py b/Lib/mailbox.py --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -514,13 +514,11 @@ else: return - # We record the current time - 1sec so that, if _refresh() is called - # again in the same second, we will always re-read the mailbox - # just in case it's been modified. (os.path.mtime() only has - # 1sec resolution.) This results in a few unnecessary re-reads - # when _refresh() is called multiple times in the same second, - # but once the clock ticks over, we will only re-read as needed. - now = time.time() - 1 + # Try to be fancy by using a date in the past for our _last_read mtime + # checks (see issues #6896, #11999) + # Using a two second resolution should be enough to overcome all + # fuzziness which may be introduced along the different filesystems. + now = time.time() - 2 self._toc = {} def update_dir (subdir):