Skip to content

Commit b6f6c5f

Browse files
committed
Wrap 'subdir/line' in PosixPath to ensure the output uses posix path separators. Ref python/cpython#103661.
1 parent 4119720 commit b6f6c5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

importlib_metadata/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,13 @@ def _read_files_egginfo_installed(self):
538538
return
539539

540540
ret = [
541-
str((subdir / line).resolve().relative_to(self.locate_file('').resolve()))
541+
str(
542+
pathlib.PurePosixPath(
543+
(subdir / line)
544+
.resolve()
545+
.relative_to(self.locate_file('').resolve())
546+
)
547+
)
542548
for line in text.splitlines()
543549
]
544550
return map('"{}"'.format, ret)

0 commit comments

Comments
 (0)