[issue11415] ZipFile don't overwrite compresed files at create

Jesús Leganés Combarro report at bugs.python.org
Sun Mar 6 19:24:13 CET 2011


New submission from Jesús Leganés Combarro <piranna at gmail.com>:

I've created a new, compresed ZipFile in memory (using StringIO) and added several files to it with ZipFile.write(), later i've added a new file with the same name of one of the previous ones just to overwrite it with some dinamic data using ZipFile.writestr(), and finally i've closed the StringIO ZipFile and writen to the hard disk.

Secondly, i've opened it with FileRoller and found that the overwritten file is twice inside the ZipFile, the first and the second one, with different sizes and timestamp. Luckily, extracting one of them just get only the more recent one, but the fact is that the old one is already there and it's listed instead being overwritten with the last, new one, and i don't know if it's a bug (i think so) or just a feature.

----------
messages: 130182
nosy: piranna
priority: normal
severity: normal
status: open
title: ZipFile don't overwrite compresed files at create
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11415>
_______________________________________


More information about the Python-bugs-list mailing list