[Patch #1514543] mailbox (Maildir): avoid losing messages on name clash
commit3b02b21734868ae8d5f12711de7da40acba9b1ae
authorandrew.kuchling <andrew.kuchling@6015fed2-1504-0410-9fe1-9d1591cc4771>
Fri, 10 Nov 2006 13:15:58 +0000 (10 13:15 +0000)
committerandrew.kuchling <andrew.kuchling@6015fed2-1504-0410-9fe1-9d1591cc4771>
Fri, 10 Nov 2006 13:15:58 +0000 (10 13:15 +0000)
tree8762cd1e8a2d610505defd29149ed177c0214fa0
parentd04f598f787c5b1fd6d9392eac0f276c7b2c1926
[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.

git-svn-id: http://svn.python.org/projects/python/branches/release25-maint@52720 6015fed2-1504-0410-9fe1-9d1591cc4771
Lib/mailbox.py
Misc/NEWS