From: Martin v. Löwis Date: Tue, 1 May 2012 06:44:08 +0000 (+0200) Subject: Recognize unsupported feature "compressed patch data set" from zip 2.7. X-Git-Tag: v3.3.0a3~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a2ce328fb32424e9ddef853211d5d877eb3d5b5;p=thirdparty%2FPython%2Fcpython.git Recognize unsupported feature "compressed patch data set" from zip 2.7. --- diff --git a/Lib/zipfile.py b/Lib/zipfile.py index ff7f30fd4fa4..fa6a433076a7 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -1053,6 +1053,10 @@ class ZipFile: if fheader[_FH_EXTRA_FIELD_LENGTH]: zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH]) + if zinfo.flag_bits & 0x20: + # Zip 2.7: compressed patched data + raise NotImplementedError("compressed patched data (flag bit 5)") + if zinfo.flag_bits & 0x800: # UTF-8 filename fname_str = fname.decode("utf-8")