[issue4710] [PATCH] zipfile.ZipFile does not extract directories properly
Gabriel Genellina
report at bugs.python.org
Sat Dec 27 06:33:20 CET 2008
Gabriel Genellina <gagsl-py2 at yahoo.com.ar> added the comment:
Your usage of os.sep is incorrect, both when reading and writing
directories.
Zip files are (more-or-less) platform independent. The specification
*requires* forward slashes in paths [1], and the zipfile module
already writes them that way. Checking for os.sep is wrong - at least
on Windows.
I've never encountered malformed entries of that kind (like "directory
\" instead of "directory/") but if you want to suport such beasts,
check for "/" *and* os.sep explicitely.
[1] See APPNOTE.TXT (there is a link near the top of zipfile.py)
----------
nosy: +gagenellina
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4710>
_______________________________________
More information about the Python-bugs-list
mailing list