Message225325
| Author |
Antony.Lee |
| Recipients |
Antony.Lee |
| Date |
2014年08月14日.23:27:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1408058862.32.0.0511670758715.issue22201@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
With Python 3.4.1:
$ mkdir foo; zip -r foo{,}; python -mzipfile -e foo.zip dest
adding: foo/ (stored 0%)
Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.4/zipfile.py", line 1799, in <module>
main()
File "/usr/lib/python3.4/zipfile.py", line 1777, in main
with open(tgt, 'wb') as fp:
IsADirectoryError: [Errno 21] Is a directory: 'dest/foo/'
Note that zipfile is actually able to unzip the file:
$ python -c 'from zipfile import *; ZipFile("foo.zip").extractall("dest")'
works fine.
If the zip file is created by "python -mzipfile -c foo.zip foo" then there is no problem. Likewise, if there are no folders in the zip file (but just a collection of files) then there is no problem. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年08月14日 23:27:42 | Antony.Lee | set | recipients:
+ Antony.Lee |
| 2014年08月14日 23:27:42 | Antony.Lee | set | messageid: <1408058862.32.0.0511670758715.issue22201@psf.upfronthosting.co.za> |
| 2014年08月14日 23:27:42 | Antony.Lee | link | issue22201 messages |
| 2014年08月14日 23:27:41 | Antony.Lee | create |
|