Skip to content

Commit 2cd7555

Browse files
committed
Fix handling of duplicate ZipFile entries
1 parent 746d885 commit 2cd7555

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

comiclib/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ def __init__(self, file):
9292
self.file = Path(file)
9393
if self.file.suffix.lower() == '.zip':
9494
self.zipfile = ZipFile(file)
95+
# Fix handling of duplicate ZipFile entries
96+
# see https://github.com/python/cpython/issues/117779
97+
for zinfo in self.zipfile.infolist():
98+
zinfo._end_offset = None
9599
return
96100
else:
97101
self.zipfile = None

0 commit comments

Comments
 (0)