diff Lib/zipfile.py @ 76684:e2ff6113ec6c

Recognize unsupported feature "compressed patch data set" from zip 2.7.
author Martin v. Löwis <martin@v.loewis.de>
date Tue, 01 May 2012 08:44:08 +0200
parents 596b0eaeece8
children 7bdac82c16ab
line wrap: on
line diff
--- a/Lib/zipfile.py	Tue May 01 08:38:01 2012 +0200
+++ b/Lib/zipfile.py	Tue May 01 08:44:08 2012 +0200
@@ -1053,6 +1053,10 @@
         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")