Skip to content

Commit 0eb6999

Browse files
bpo-22102: Fixes zip files with disks set to 0 (GH-5985)
(cherry picked from commit ab0716e) Co-authored-by: Francisco Facioni <fran6co@gmail.com>
1 parent 218abd1 commit 0eb6999

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/zipfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _EndRecData64(fpin, offset, endrec):
224224
if sig != stringEndArchive64Locator:
225225
return endrec
226226

227-
if diskno != 0 or disks != 1:
227+
if diskno != 0 or disks > 1:
228228
raise BadZipFile("zipfiles that span multiple disks are not supported")
229229

230230
# Assume no 'zip64 extensible data'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added support for ZIP files with disks set to 0. Such files are commonly created by builtin tools on Windows when use ZIP64 extension.
2+
Patch by Francisco Facioni.

0 commit comments

Comments
 (0)