]> granicus.if.org Git - python/commit
[Patch #1514543] mailbox (Maildir): avoid losing messages on name clash
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 10 Nov 2006 13:15:58 +0000 (13:15 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 10 Nov 2006 13:15:58 +0000 (13:15 +0000)
commit7ea928c452e2baaa929e5a078d796ece3720e765
tree0fe66a8d275f0fd86ae1c9afd759b6fc530c3acf
parentbb876b9c69f80c253621937ad734eafef3086e5f
[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.
Lib/mailbox.py
Misc/NEWS