[issue11415] ZipFile don't overwrite compresed files at create
Terry J. Reedy tjre...@udel.edu added the comment: 2.6 is only open for security fixes. -- nosy: +terry.reedy resolution: - invalid status: open - closed superseder: - remove/delete method for zipfile/tarfile objects versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11415] ZipFile don't overwrite compresed files at create
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Luckily, extracting one of them just get only the more recent one It's not only luck: a Zip file has a central directory used to retrieve data. ZipFile just appends the new file data to the end of the Zip file, then write the updated directory structure. Removing the old content is another matter, and is similar to issue6818. This requires a whole copy of the zip file, and so far, no acceptable patch was proposed. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11415] ZipFile don't overwrite compresed files at create
Jesús Leganés Combarro pira...@gmail.com added the comment: Ok, they talk about remove it, that's why i didn't found it :-P Ok, it make sense. By the way, this way the old data is available? How? (Just to know... it could be a courious feature :-D ) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11415] ZipFile don't overwrite compresed files at create
New submission from Jesús Leganés Combarro pira...@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 rep...@bugs.python.org http://bugs.python.org/issue11415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com