Skip to content

Commit

Permalink
Wrap 'subdir/line' in PosixPath to ensure the output uses posix path …
Browse files Browse the repository at this point in the history
…separators. Ref python/cpython#103661.
  • Loading branch information
jaraco committed Apr 22, 2023
1 parent 4119720 commit b6f6c5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,13 @@ def _read_files_egginfo_installed(self):
return

ret = [
str((subdir / line).resolve().relative_to(self.locate_file('').resolve()))
str(
pathlib.PurePosixPath(
(subdir / line)
.resolve()
.relative_to(self.locate_file('').resolve())
)
)
for line in text.splitlines()
]
return map('"{}"'.format, ret)
Expand Down

0 comments on commit b6f6c5f

Please sign in to comment.