From: Serhiy Storchaka Date: Sat, 22 Sep 2018 17:48:23 +0000 (+0300) Subject: [2.7] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (ПР-9407) X-Git-Tag: v2.7.16rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ec298114855b648a1f5fc4188ea3686a9d77fb3;p=thirdparty%2FPython%2Fcpython.git [2.7] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (ПР-9407) This makes streamed zips compatible with MacOS Archive Utility and other applications. (cherry picked from commit 4ba3b50bfe6d50cd82d208023ea23e203ab50589) Co-authored-by: Silas Sewell --- diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 0f890ac6f3ab..991a0add205d 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -131,6 +131,8 @@ _CD64_NUMBER_ENTRIES_TOTAL = 7 _CD64_DIRECTORY_SIZE = 8 _CD64_OFFSET_START_CENTDIR = 9 +_DD_SIGNATURE = 0x08074b50 + _EXTRA_FIELD_STRUCT = struct.Struct('