commit | 0f4ed2cdc6e7887153c481f4c7298bc35e219d84 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sun Jan 01 19:04:09 2017 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Sun Jan 01 19:04:09 2017 +0200 |
tree | b32c0db490b4136dc6ededa8eee3aeb9aa28f1f8 | |
parent | c644d53acfa0e4f1fe470430e15e69717da4f264 [diff] |
Issue #29094: Offsets in a ZIP file created with extern file object and modes "w" now are relative to the start of the file.
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 1d10650..cc9f2e6 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py
@@ -772,7 +772,7 @@ # set the modified flag so central directory gets written # even if no files are added to the archive self._didModify = True - self._start_disk = self.fp.tell() + self._start_disk = 0 elif key == 'a': try: # See if file is a zip file