mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
Fix isAbsolute for Windows root directories
This commit is contained in:
@@ -434,8 +434,8 @@ when not declared(getEnv) or defined(nimscript):
|
||||
## On Windows, network paths are considered absolute too.
|
||||
when doslike:
|
||||
var len = len(path)
|
||||
result = (len > 1 and path[0] in {'/', '\\'}) or
|
||||
(len > 2 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':')
|
||||
result = (len > 0 and path[0] in {'/', '\\'}) or
|
||||
(len > 1 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':')
|
||||
elif defined(macos):
|
||||
result = path.len > 0 and path[0] != ':'
|
||||
elif defined(RISCOS):
|
||||
|
||||
Reference in New Issue
Block a user