mirror of https://github.com/pypa/pip
Merge pull request #8062 from cjc7373/issue_7625
This commit is contained in:
commit
642fb07337
|
@ -0,0 +1 @@
|
|||
Fix normalizing path on Windows when installing package on another logical disk.
|
|
@ -262,6 +262,10 @@ def _record_to_fs_path(record_path):
|
|||
def _fs_to_record_path(path, relative_to=None):
|
||||
# type: (text_type, Optional[text_type]) -> RecordPath
|
||||
if relative_to is not None:
|
||||
# On Windows, do not handle relative paths if they belong to different
|
||||
# logical disks
|
||||
if os.path.splitdrive(path)[0].lower() == \
|
||||
os.path.splitdrive(relative_to)[0].lower():
|
||||
path = os.path.relpath(path, relative_to)
|
||||
path = path.replace(os.path.sep, '/')
|
||||
return cast('RecordPath', path)
|
||||
|
|
Loading…
Reference in New Issue