This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author janzert
Recipients janzert, petri.lehtinen
Date 2013-09-16.18:58:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379357916.81.0.287125303462.issue19037@psf.upfronthosting.co.za>
In-reply-to
Content
The Maildir.add and Maildir.__setitem__ methods in the mailbox module attempts to change the file mtime after moving the file into the new directory. This allows a race condition since other programs are can move or otherwise modify the file as soon as it is placed in the new directory. If the file is moved from the new directory before the mtime is set this results in an unexpected OSError exception.

The fix seems to simply be setting the file mtime before moving the file into its final position.
History
Date User Action Args
2013-09-16 18:58:36janzertsetrecipients: + janzert, petri.lehtinen
2013-09-16 18:58:36janzertsetmessageid: <1379357916.81.0.287125303462.issue19037@psf.upfronthosting.co.za>
2013-09-16 18:58:36janzertlinkissue19037 messages
2013-09-16 18:58:36janzertcreate