]> granicus.if.org Git - python/commit
[Patch #1514543] mailbox (Maildir): avoid losing messages on name clash
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 9 Nov 2006 21:16:46 +0000 (21:16 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 9 Nov 2006 21:16:46 +0000 (21:16 +0000)
commit978d8286ae36ac3570d1a2c6f48187ad9c0919c7
treec5a4821258061a9887a4c5eb702df7beec4216c8
parent6fc2382883516434c5876e768fabd75a0c633d84
[Patch #1514543] mailbox (Maildir): avoid losing messages on name clash

Two changes:

Where possible, use link()/remove() to move files into a directory; this
makes it easier to avoid overwriting an existing file.

Use _create_carefully() to create files in tmp/, which uses O_EXCL.

Backport candidate.
Lib/mailbox.py
Misc/NEWS