mirror of
https://github.com/python/cpython.git
synced 2025-09-03 23:41:18 +00:00
[3.11] gh-101566: Sync with zipp 3.14. (GH-102018). (GH-102090)
(cherry picked from commit 36854bbb24
)
Backport of bugfix only.
Automerge-Triggered-By: GH:jaraco
This commit is contained in:
parent
62c0327487
commit
d15e9589f3
3 changed files with 25 additions and 0 deletions
|
@ -2250,6 +2250,17 @@ class CompleteDirs(ZipFile):
|
|||
dir_match = name not in names and dirname in names
|
||||
return dirname if dir_match else name
|
||||
|
||||
def getinfo(self, name):
|
||||
"""
|
||||
Supplement getinfo for implied dirs.
|
||||
"""
|
||||
try:
|
||||
return super().getinfo(name)
|
||||
except KeyError:
|
||||
if not name.endswith('/') or name not in self._name_set():
|
||||
raise
|
||||
return ZipInfo(filename=name)
|
||||
|
||||
@classmethod
|
||||
def make(cls, source):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue