mirror of
https://github.com/python/cpython.git
synced 2024-11-28 12:31:14 +08:00
Don't seek to the start of the file when open ZipFile with the 'w' mode
(regression introduced in issue #14099).
This commit is contained in:
parent
7929be6aeb
commit
5b90f5de26
@ -1002,7 +1002,7 @@ class ZipFile:
|
||||
# set the modified flag so central directory gets written
|
||||
# even if no files are added to the archive
|
||||
self._didModify = True
|
||||
self.start_dir = 0
|
||||
self.start_dir = self.fp.tell()
|
||||
elif mode == 'a':
|
||||
try:
|
||||
# See if file is a zip file
|
||||
|
Loading…
Reference in New Issue
Block a user