Skip to content

Commit ecdce93

Browse files
committed
Recognize UNC roots on older Python versions
1 parent 8433260 commit ecdce93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

git/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def _is_path_rooted(path: PathLike) -> bool:
326326
"""
327327
drive, tail = osp.splitdrive(os.fspath(path))
328328
separators = (os.sep,) if os.altsep is None else (os.sep, os.altsep)
329-
return tail.startswith(separators) or bool(drive) and osp.isabs(path)
329+
return tail.startswith(separators) or drive.startswith(separators)
330330

331331

332332
def _to_relative_path(root: PathLike, path: PathLike) -> str:

0 commit comments

Comments
 (0)