Skip to content

Commit fdba9f0

Browse files
committed
Lint (splitroot requires 3.12)
1 parent f5f0548 commit fdba9f0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Tools/build/generate-build-details.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ def relative_path(path: str, base: str) -> str:
173173
return os.path.relpath(path, base)
174174

175175
# There are no relative paths between drives on Windows.
176-
path_drv, path_root, _ = os.path.splitroot(path)
177-
base_drv, base_root, _ = os.path.splitroot(base)
178-
if path_drv.lower() == base_drv.lower() and path_root == base_root:
176+
path_drv, _ = os.path.splitdrive(path)
177+
base_drv, _ = os.path.splitdrive(base)
178+
if path_drv.lower() == base_drv.lower():
179179
return os.path.relpath(path, base)
180180

181181
return path

0 commit comments

Comments
 (0)