[issue6839] zipfile can't extract file
Francisco Martín Brugué
report at bugs.python.org
Wed Apr 30 22:13:09 CEST 2014
Francisco Martín Brugué added the comment:
A small question related to: "zipfile_276_filename_mismatch_v3.patch"
--- a/zipfile.py Wed Apr 30 11:44:38 2014
+++ b/zipfile.py Wed Apr 30 15:10:38 2014
@@ -970,10 +970,10 @@
if fheader[_FH_EXTRA_FIELD_LENGTH]:
zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])
- if fname != zinfo.orig_filename:
- raise BadZipfile, \
+ if self.debug and fname != zinfo.orig_filename:
+ print( \
'File name in directory "%s" and header "%s" differ.' % (
- zinfo.orig_filename, fname)
+ zinfo.orig_filename, fname))
Shouldn't a change from raising an exception to a print be somewhere documented?
Thanks
----------
nosy: +francismb
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6839>
_______________________________________
More information about the Python-bugs-list
mailing list