mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-120910: Fix issue resolving relative paths outside site-packages. (#120911)
Incorporates changes from importlib_metadata 7.2.1.
This commit is contained in:
parent
0b918e81c1
commit
1ba0bb21ed
4 changed files with 38 additions and 1 deletions
|
@ -567,7 +567,7 @@ class Distribution(DeprecatedNonAbstract):
|
|||
paths = (
|
||||
(subdir / name)
|
||||
.resolve()
|
||||
.relative_to(self.locate_file('').resolve())
|
||||
.relative_to(self.locate_file('').resolve(), walk_up=True)
|
||||
.as_posix()
|
||||
for name in text.splitlines()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue