Title: Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows. · Issue #94018 · python/cpython · GitHub
Open Graph Title: Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows. · Issue #94018 · python/cpython
X Title: Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows. · Issue #94018 · python/cpython
Description: 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...
Open Graph Description: 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' C...
X Description: 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.tx...
Opengraph URL: https://github.com/python/cpython/issues/94018
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Excess spaces at the end of files or repositorys are not handle when extracting zip files on Windows.","articleBody":"**Bug report**\r\n\r\nExcess spaces at the end of files or repositorys are not handle when extracting zip files on Windows.\r\n`FileNotFoundError: [Errno 2] No such file or directory: 'C:\\\\Documents \\\\test.txt'`\r\n\r\nCan be tested with this [Documents.zip](https://github.com/python/cpython/files/8939776/Documents.zip)\r\nand this piece of code:\r\n```\r\nfrom zipfile import ZipFile\r\nwith ZipFile('Documents.zip', 'r') as zip:\r\n zip.extractall()\r\n```\r\nFix proposal\r\n\r\ncpython/Lib/zipfile.py : 1690\r\n```\r\n# remove end spaces\r\ndef remove_end_spaces(x):\r\n for c in x[::-1]:\r\n if(c == ' '): x = x[:-1]\r\n else: return x\r\narcname = (remove_end_spaces(x) for x in arcname)\r\n```\r\n\r\n**Your environment**\r\n- CPython versions tested on: python 3.9\r\n- Operating system and architecture: Windows 10 Professionnel 21H2 19044.1706\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-134712\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Rygone","@type":"Person","name":"Rygone"},"datePublished":"2022-06-20T10:33:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/94018/cpython/issues/94018"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d200f7e5-9efd-3ce4-8632-35ea05916622 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C89C:2603AD:F94A35:14915C4:696B6824 |
| html-safe-nonce | 57f13024310b674863d88d7fbb9b33a69d9e9b7dfe4097db6553685523e110b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODlDOjI2MDNBRDpGOTRBMzU6MTQ5MTVDNDo2OTZCNjgyNCIsInZpc2l0b3JfaWQiOiI0MDMwODI2MzQ1MjA4MTc4NzI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a6a40387fa1317fae8012b375f4744cd083eb225f405c4b6a407f6d05b5e0716 |
| hovercard-subject-tag | issue:1276721996 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/94018/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d050cf4c45ebbe881bd20c946a205239674689e05bf6572c364c86ddaa458b02/python/cpython/issues/94018 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d050cf4c45ebbe881bd20c946a205239674689e05bf6572c364c86ddaa458b02/python/cpython/issues/94018 |
| og:image:alt | 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' C... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Rygone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width