[issue2824] zipfile to handle duplicate files in archive

Jerry Heiselman report at bugs.python.org
Wed Jan 27 14:00:31 EST 2021


Jerry Heiselman <jerry at heiselman.com> added the comment:

This just bit us too. I don't feel like a warning is enough. In our case, we want to prevent it from happening to begin with so that a developer who isn't expecting this doesn't have to know ahead of time to check for a file.

Once a duplicate is in the zip file, it is maintained in the listing of files, but deleting one of the entries using Windows explorer results in both entries being deleted which can (and has) led to a loss of data. So preventing it from happening in the first place seems more prudent. Of course, allow an override with a parameter to .write() perhaps.

----------
nosy: +jheiselman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2824>
_______________________________________


More information about the Python-bugs-list mailing list