-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
zipfile library doesn't extract windows zip files properly on linux #91036
Comments
Created a zip file using Powershell's Compress-Archive method. |
Can you attach such a .zip file so that others can reproduce the bug? |
From the Zip File Specification
Opening the archive with I think it would be justified to leave the behaviour as it is currently but I also think there's an argument to accommodate for archives like these. Relevant stack exchange post: https://superuser.com/questions/1382839/zip-files-expand-with-backslashes-on-linux-no-subdirectories |
Actually, the more relevant entry is https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/mitigation-ziparchiveentry-fullname-path-separator. ... |
See also #117084. Backslashes are already partially supported as path component separators in extraction on Windows. Partially -- because it does not work for explicit directories (what #117084 is about). You can enable this on non-Windows platform by temporary setting We may add an option to better control this behavior on all platforms. It should allow to treat a backslash as a path component separator on non-Windows platforms or as error on Windows, or emit warnings, or raise errors. It may also control the processing of absolute paths, paths containing the |
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: