Patches item #1514543, was opened at 2006-06-29 14:26
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1514543&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
>Status: Closed
Resolution: Accepted
Priority: 6
Private: No
Submitted By: David Watson (baikie)
Assigned to: A.M. Kuchling (akuchling)
Summary: mailbox (Maildir): avoid losing messages on name clash

Initial Comment:
The Maildir specification says that messages should be
moved into the "new" directory using link()/unlink(),
not rename().  This isn't for compatibility with
ancient Unixes, but to avoid overwriting an existing
message if the "unique" name turns out not to be unique
after all.  (In the current implementation this can
happen if the system clock only has whole-second
resolution and deliveries are being done in
subprocesses, or the clock has been adjusted backwards,
or two machines have the same hostname.)  Similarly,
the file in "tmp" should be created O_EXCL.  This patch
implements these requirements, falling back to rename()
if link() is unavailable (where on Windows at least,
it's supposed to fail if the destination exists), and
raising ExternalClashError when the link/rename fails
due to the name already being taken in "new".


----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-11-10 08:24

Message:
Logged In: YES 
user_id=11375

Applied to 25-maint in rev. 52720.  Thanks for the patch!


----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2006-11-09 16:17

Message:
Logged In: YES 
user_id=11375

Applied to the trunk in rev. 52712; will backport to
25-maint after seeing what happens on the buildbots.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1514543&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to