Message407620
| Author |
andrei.avk |
| Recipients |
andrei.avk, docs@python, eric.araujo, huantian, peter@psantoro.net, pitrou, r.david.murray |
| Date |
2021年12月04日.00:29:55 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1638577795.24.0.847777515278.issue20907@roundup.psfhosted.org> |
| In-reply-to |
| Content |
I think it may be good enough to add a warning on skipped files in _unpack_zipfile().
- this way we keep backwards compatibility (especially since behavior in both modules differed for such a long time.)
- it's not clear that ZipFile behavior is superior -- for example, what if a file with stripped path components overwrites existing files?
- if requested in the future, a parameter can be added to enable ZipFile-like behavior
- it can be very confusing if files are silently skipped, especially if an archive has thousands of files.
I've added a PR, note that the test in PR also tests that files with '..' are indeed skipped, we don't have a test for that now, so that's an added benefit. |
|