diff options
author | Zackery Spytz <zspytz@gmail.com> | 2023-12-25 15:07:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-25 15:07:51 (GMT) |
commit | 3f5eb3e6c75b874db1a83c9d53e824e56fcad02e (patch) | |
tree | 03b86133f14368d15e48bb25568e14dbe50291f3 /Lib/mailbox.py | |
parent | f7c5a7a0f9f8186a7fdc8b721468d022fe310b04 (diff) | |
download | cpython-3f5eb3e6c75b874db1a83c9d53e824e56fcad02e.zip cpython-3f5eb3e6c75b874db1a83c9d53e824e56fcad02e.tar.gz cpython-3f5eb3e6c75b874db1a83c9d53e824e56fcad02e.tar.bz2 |
bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)
The maildir format specification states that files with a leading dot
should be ignored.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/mailbox.py')
-rw-r--r-- | Lib/mailbox.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 36afade..574c014 100644 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -590,6 +590,8 @@ class Maildir(Mailbox): for subdir in self._toc_mtimes: path = self._paths[subdir] for entry in os.listdir(path): + if entry.startswith('.'): + continue p = os.path.join(path, entry) if os.path.isdir(p): continue |