[Python-checkins] bpo-22102: Fixes zip files with disks set to 0 (GH-5985)
Cheryl Sabella
webhook-mailer at python.org
Tue May 28 19:15:23 EDT 2019
https://github.com/python/cpython/commit/ab0716ed1ea2957396054730afbb80c1825f9786
commit: ab0716ed1ea2957396054730afbb80c1825f9786
branch: master
author: Francisco Facioni <fran6co at gmail.com>
committer: Cheryl Sabella <cheryl.sabella at gmail.com>
date: 2019-05-28T19:15:11-04:00
summary:
bpo-22102: Fixes zip files with disks set to 0 (GH-5985)
files:
A Misc/NEWS.d/next/Library/2018-03-08-16-15-00.bpo-22102.th33uD.rst
M Lib/zipfile.py
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 8f8cb863b003..5496f6eb1867 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -226,7 +226,7 @@ def _EndRecData64(fpin, offset, endrec):
if sig != stringEndArchive64Locator:
return endrec
- if diskno != 0 or disks != 1:
+ if diskno != 0 or disks > 1:
raise BadZipFile("zipfiles that span multiple disks are not supported")
# Assume no 'zip64 extensible data'
diff --git a/Misc/NEWS.d/next/Library/2018-03-08-16-15-00.bpo-22102.th33uD.rst b/Misc/NEWS.d/next/Library/2018-03-08-16-15-00.bpo-22102.th33uD.rst
new file mode 100644
index 000000000000..ad690f57c523
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-03-08-16-15-00.bpo-22102.th33uD.rst
@@ -0,0 +1,2 @@
+Added support for ZIP files with disks set to 0. Such files are commonly created by builtin tools on Windows when use ZIP64 extension.
+Patch by Francisco Facioni.
More information about the Python-checkins
mailing list