]> granicus.if.org Git - python/commitdiff
Recognize unsupported feature "compressed patch data set" from zip 2.7.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 1 May 2012 06:44:08 +0000 (08:44 +0200)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 1 May 2012 06:44:08 +0000 (08:44 +0200)
Lib/zipfile.py

index ff7f30fd4fa4e34382348dfee012a0b378b4ef68..fa6a433076a75fbad922bc2cfca65b14dcb06647 100644 (file)
@@ -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")