-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] zipfile.ZipFile does not extract directories properly #48960
Comments
This behaviour has been known of course for quite long time. I suppose Currently, if a ZIP archive contains some subdirectories then Attached is a patch against current 2.7 tree. Applied, will make |
I'm no expert, but is it possible for ZIP files to have Windows-style |
I'm not sure if it would make sense to save current AFAIK there'd be no problem with Windows-style paths but to be sure I Yes, I'm sorry for the lack of tests, it is my first patch and I forgot |
Here is a revised version of the patch with directories support for This time without tests as well because I don't want to mess up with |
Your usage of os.sep is incorrect, both when reading and writing Zip files are (more-or-less) platform independent. The specification I've never encountered malformed entries of that kind (like "directory [1] See APPNOTE.TXT (there is a link near the top of zipfile.py) |
Here is a version of the patch that rationalizes usage of os.sep, fixes |
Committed as r68885, r68886, r68887, and r68888 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: