Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/installer/destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from installer.records import Hash, RecordEntry
from installer.scripts import Script
from installer.utils import (
_WINDOWS,
Scheme,
construct_record_file,
copyfileobj_with_hashing,
Expand Down Expand Up @@ -267,10 +268,13 @@ def finalize_installation(
def prefix_for_scheme(file_scheme: str) -> Optional[str]:
if file_scheme == scheme:
return None
path = os.path.relpath(
self.scheme_dict[file_scheme],
start=self.scheme_dict[scheme],
)
if _WINDOWS: # pragma: no cover
path = os.path.abspath(self.scheme_dict[file_scheme]) # noqa: PTH100
else:
path = os.path.relpath(
self.scheme_dict[file_scheme],
start=self.scheme_dict[scheme],
)
return path + "/"

record_list = list(records)
Expand Down
Loading