Message121376
When extracting a zip file containing deep hierarchy files, `extractall` throws IOError on Windows - perhaps due to limitation in Windows max path length. Ideally it should be throwing an instance of zipfile.ZipError - so that application can handle it reliably. An IOError can mean a wide range of errors, so it is pointless to catch IOError and ignore it.
To reproduce, run extractall over http://pypi.python.org/packages/source/c/collective.generic.skel/collective.generic.skel-0.1.0.zip using Python 2.6.6 or Python 2.7
> python -c "import zipfile
; f=zipfile.ZipFile('collective.generic.skel-0.1.0.zip'); f.extractall()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\zipfile.py", line 923, in extractall
self.extract(zipinfo, path, pwd)
File "C:\Python27\lib\zipfile.py", line 911, in extract
return self._extract_member(member, path, pwd)
File "C:\Python27\lib\zipfile.py", line 955, in _extract_member
target = file(targetpath, "wb")
IOError: [Errno 2] No such file or directory: 'C:\\Documents and Settings\\apy\\
My Documents\\Downloads\\collective.generic.skel-0.1.0\\src\\collective\\generic
\\skel\\skin\\tmpl\\+namespace++ndot++nested_namespace+.+project_name+\\src\\+na
mespace+\\+nested_namespace+\\+project_name+\\profiles\\default\\+namespace++ndo
t++nested_namespace+.+project_name+_various.txt_tmpl' |
|
Date |
User |
Action |
Args |
2010-11-17 19:14:13 | srid | set | recipients:
+ srid |
2010-11-17 19:14:13 | srid | set | messageid: <1290021253.83.0.149273656602.issue10447@psf.upfronthosting.co.za> |
2010-11-17 19:14:11 | srid | link | issue10447 messages |
2010-11-17 19:14:11 | srid | create | |
|