Skip to content

Commit 8f55fb3

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

importlib_metadata/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,11 @@ 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.PosixPath(subdir / line)
543+
.resolve()
544+
.relative_to(self.locate_file('').resolve())
545+
)
542546
for line in text.splitlines()
543547
]
544548
return map('"{}"'.format, ret)

0 commit comments

Comments
 (0)