Fix isAbsolute for Windows root directories
This commit is contained in:
parent
7c22c03876
commit
bc305261d9
1 changed files with 2 additions and 2 deletions
|
|
@ -434,8 +434,8 @@ when not declared(getEnv) or defined(nimscript):
|
||||||
## On Windows, network paths are considered absolute too.
|
## On Windows, network paths are considered absolute too.
|
||||||
when doslike:
|
when doslike:
|
||||||
var len = len(path)
|
var len = len(path)
|
||||||
result = (len > 1 and path[0] in {'/', '\\'}) or
|
result = (len > 0 and path[0] in {'/', '\\'}) or
|
||||||
(len > 2 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':')
|
(len > 1 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':')
|
||||||
elif defined(macos):
|
elif defined(macos):
|
||||||
result = path.len > 0 and path[0] != ':'
|
result = path.len > 0 and path[0] != ':'
|
||||||
elif defined(RISCOS):
|
elif defined(RISCOS):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue