File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 15
15
from installer .records import Hash , RecordEntry
16
16
from installer .scripts import Script
17
17
from installer .utils import (
18
+ _WINDOWS ,
18
19
Scheme ,
19
20
construct_record_file ,
20
21
copyfileobj_with_hashing ,
@@ -267,10 +268,13 @@ def finalize_installation(
267
268
def prefix_for_scheme (file_scheme : str ) -> Optional [str ]:
268
269
if file_scheme == scheme :
269
270
return None
270
- path = os .path .relpath (
271
- self .scheme_dict [file_scheme ],
272
- start = self .scheme_dict [scheme ],
273
- )
271
+ if _WINDOWS : # pragma: no cover
272
+ path = os .path .abspath (self .scheme_dict [file_scheme ]) # noqa: PTH100
273
+ else :
274
+ path = os .path .relpath (
275
+ self .scheme_dict [file_scheme ],
276
+ start = self .scheme_dict [scheme ],
277
+ )
274
278
return path + "/"
275
279
276
280
record_list = list (records )
You can’t perform that action at this time.
0 commit comments