Issue 21360: mailbox.Maildir should ignore files named with a leading dot
Created on 2014-04-26 22:06 by liw, last changed 2022-04-11 14:58 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 11833 | open | ZackerySpytz, 2019-02-12 23:16 | |
| Messages (4) | |||
|---|---|---|---|
| msg217221 - (view) | Author: Lars Wirzenius (liw) | Date: 2014-04-26 22:06 | |
The maildir format specification (see http://cr.yp.to/proto/maildir.html) is clear that files named with leading dots should be ignore: Unless you're writing messages to a maildir, the format of a unique name is none of your business. A unique name can be anything that doesn't contain a colon (or slash) and doesn't start with a dot. Do not try to extract information from unique names. Test case: liw@havelock$ find Maildir -ls 8921206 4 drwxrwxr-x 5 liw liw 4096 Apr 26 23:03 Maildir 8921207 4 drwxrwxr-x 2 liw liw 4096 Apr 26 23:03 Maildir/cur 8921209 4 drwxrwxr-x 2 liw liw 4096 Apr 26 23:03 Maildir/tmp 8921208 4 drwxrwxr-x 2 liw liw 4096 Apr 26 23:03 Maildir/new 8913523 0 -rw-rw-r-- 1 liw liw 0 Apr 26 23:03 Maildir/new/.foo liw@havelock$ python -c 'import mailbox maildir = mailbox.Maildir("Maildir") print maildir.keys() ' ['.foo'] liw@havelock$ The correct output would be the empty list. "mutt -f Maildir" correctly shows now messages in that folder. |
|||
| msg218557 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2014-05-14 17:59 | |
I wonder if changing this would break any working programs. I'd like to think not, but it is certainly possible for someone to be actually depending this bug. |
|||
| msg335375 - (view) | Author: Zackery Spytz (ZackerySpytz) * ![]() |
Date: 2019-02-12 23:20 | |
I've created a PR for this issue. |
|||
| msg354046 - (view) | Author: Abhilash Raj (maxking) * ![]() |
Date: 2019-10-06 19:49 | |
David: How do you propose we move forward on this? Should we provide a switch to keep the original behaviour (which is off by default) so if there is someone depending on this bug, they could still continue to do it with relatively small change? It is a change of behaviour, so probably isn't going to be back ported if it gets merged in 3.9 window. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:02 | admin | set | github: 65559 |
| 2019-10-06 19:49:27 | maxking | set | nosy:
+ maxking messages: + msg354046 |
| 2019-02-12 23:20:09 | ZackerySpytz | set | nosy:
+ ZackerySpytz messages:
+ msg335375 |
| 2019-02-12 23:16:06 | ZackerySpytz | set | keywords:
+ patch stage: patch review pull_requests: + pull_request11864 |
| 2015-02-12 06:06:55 | mdengler | set | nosy:
+ mdengler |
| 2015-01-03 04:37:50 | Vincentdavis | set | nosy:
+ Vincentdavis |
| 2014-12-31 16:25:32 | akuchling | set | nosy:
- akuchling |
| 2014-05-14 17:59:55 | r.david.murray | set | nosy:
+ barry, akuchling, r.david.murray messages: + msg218557 components: + email |
| 2014-04-26 22:06:43 | liw | create | |

