mailbox.mbox.add() sets access time as well as modification time

tinnews at isbd.co.uk tinnews at isbd.co.uk
Thu Apr 23 18:50:34 EDT 2009


It seems to me that mailbox.mbox.add() sets the access time of a mbox
file as well as the modification time.  This is not good for MUAs that
detect new mail by looking to see if the access time is before the
modification time.

Have I done something wrong somewhere or is mailbox.mbox.add() really
as broken as it would appear?

The snippet of code that adds messages to a mbox is:-

    # previous code works out what destDir is (yes, I know it's not actually a directory)
    dest = mailbox.mbox(destDir, factory=None)
    dest.lock() 
    dest.add(m)
    dest.flush()
    dest.unlock()


-- 
Chris Green




More information about the Python-list mailing list