Skip to content

Commit 3b5055a

Browse files
committed
Update ZipInfo._end_offset
1 parent 7bff07c commit 3b5055a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/zipfile/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,6 +1819,8 @@ def _remove_members(self, members, *, remove_physical=True, chunk_size=2**20):
18191819
if remove_physical:
18201820
old_header_offset = info.header_offset
18211821
info.header_offset -= entry_offset
1822+
if info._end_offset is not None:
1823+
info._end_offset -= entry_offset
18221824
read_size = 0
18231825
while read_size < entry_size:
18241826
fp.seek(old_header_offset + read_size)

0 commit comments

Comments
 (0)