]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-92184: Convert os.altsep to '/' in filenames when creating ZipInfo objects (#92185)
authorCarey Metcalfe <carey@cmetcalfe.ca>
Thu, 11 May 2023 07:25:16 +0000 (01:25 -0600)
committerGitHub <noreply@github.com>
Thu, 11 May 2023 07:25:16 +0000 (07:25 +0000)
commit4abfe6a14b5be5decbaa3142d9e2549cf2d86c34
tree8935ca48a59633aaa5e4a29fae8d7eca949e1901
parentfcd5fb49b1d71165f3c503c3d2e74a082ddb2f21
GH-92184: Convert os.altsep to '/' in filenames when creating ZipInfo objects (#92185)

This causes the zipfile module to also consider the character defined by
`os.altsep` (if there is one) to be a path separator and convert it to a
forward slash, as defined by the zip specification.

A logical no-op on all known platforms today as os.altsep is currently only set to a meaningful value on Windows (where it is "/").
Lib/zipfile/__init__.py
Misc/NEWS.d/next/Library/2022-05-02-16-21-05.gh-issue-92184.hneGVW.rst [new file with mode: 0644]