Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
dcf70957
Commit
dcf70957
authored
Sep 22, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maildir.__init__(): Use the correct filter for filenames, so that this
class conforms to the maildir specification.
parent
8a038a40
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
Lib/mailbox.py
Lib/mailbox.py
+4
-7
No files found.
Lib/mailbox.py
View file @
dcf70957
...
...
@@ -182,19 +182,16 @@ class Maildir:
def
__init__
(
self
,
dirname
):
import
string
self
.
dirname
=
dirname
self
.
boxes
=
[]
# check for new mail
newdir
=
os
.
path
.
join
(
self
.
dirname
,
'new'
)
for
file
in
os
.
listdir
(
newdir
):
if
len
(
string
.
split
(
file
,
'.'
))
>
2
:
self
.
boxes
.
append
(
os
.
path
.
join
(
newdir
,
file
))
boxes
=
[
os
.
path
.
join
(
newdir
,
f
)
for
f
in
os
.
listdir
(
newdir
)
if
f
[
0
]
!=
'.'
]
# Now check for current mail in this maildir
curdir
=
os
.
path
.
join
(
self
.
dirname
,
'cur'
)
for
file
in
os
.
listdir
(
curdir
):
if
len
(
string
.
split
(
file
,
'.'
))
>
2
:
self
.
boxes
.
append
(
os
.
path
.
join
(
curdir
,
file
))
boxes
+=
[
os
.
path
.
join
(
curdir
,
f
)
for
f
in
os
.
listdir
(
curdir
)
if
f
[
0
]
!=
'.'
]
def
next
(
self
):
if
not
self
.
boxes
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment