• Andrew M. Kuchling's avatar
    [Apply length-checking.diff from bug #1599254] · eca4c312
    Andrew M. Kuchling yazdı
    Add length checking to single-file mailbox formats: before doing a
    flush() on a mailbox, seek to the end and verify its length is
    unchanged, raising ExternalClashError if the file's length has
    changed.
    
    This fix avoids potential data loss if some other process appends to
    the mailbox file after the table of contents has been generated;
    instead of overwriting the modified file, you'll get the exception.
    
    I also noticed that the self._lookup() call in self.flush() wasn't
    necessary (everything that sets self._pending to True also calls
    self.lookup()), and replaced it by an assertion.
    
    2.5 backport candidate.
    eca4c312
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
PCbuild8 Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...