changeset: 105919:342bc734f523 branch: 2.7 parent: 105917:1d5b4426fe87 user: Serhiy Storchaka date: Sun Jan 01 19:04:09 2017 +0200 files: Lib/zipfile.py Misc/NEWS description: 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 -r 1d5b4426fe87 -r 342bc734f523 Lib/zipfile.py --- a/Lib/zipfile.py Sun Jan 01 02:51:46 2017 +0300 +++ b/Lib/zipfile.py Sun Jan 01 19:04:09 2017 +0200 @@ -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 diff -r 1d5b4426fe87 -r 342bc734f523 Misc/NEWS --- a/Misc/NEWS Sun Jan 01 02:51:46 2017 +0300 +++ b/Misc/NEWS Sun Jan 01 19:04:09 2017 +0200 @@ -15,6 +15,9 @@ Library ------- +- Issue #29094: Offsets in a ZIP file created with extern file object and mode + "w" now are relative to the start of the file. + - Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox. Based on patch by Tycho Andersen.