-
-
Notifications
You must be signed in to change notification settings - Fork 30.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
Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows. #94018
Comments
Removing trailing spaces can be done using I don't think this is an issue with the zipfile library. Testing the file using unzip shows the filename as including trailing spaces and unzip extracts the file with the directory name containing the trailing spaces. I don't think this behaviour needs to be changed and I don't think it should be altered.
Testing with p7zip shows the same
|
Completely agree with the However, the problem is on Windows machines. And it's already done for dots :1688 So new proposal
|
Ok, if it causes errors on Windows then updating the sanitisation function for windows sounds very reasonable |
…honGH-94040) Closes python#94018. Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Bug report
Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Documents \\test.txt'
Can be tested with this Documents.zip
and this piece of code:
Fix proposal
cpython/Lib/zipfile.py : 1690
Your environment
The text was updated successfully, but these errors were encountered: