New submission from janzert:

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.

----------
components: Library (Lib)
messages: 197930
nosy: janzert, petri.lehtinen
priority: normal
severity: normal
status: open
title: mailbox module modifies maildir file times after moving from tmp 
directory
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19037>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to