mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911) (#120918)
Incorporates changes from importlib_metadata 7.2.1.
(cherry picked from commit 1ba0bb21ed)
This commit is contained in:
parent
673cabc23b
commit
daef7de36f
4 changed files with 42 additions and 1 deletions
|
|
@ -534,7 +534,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