mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
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>
This commit is contained in:
parent
f7c5a7a0f9
commit
3f5eb3e6c7
5 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue