mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-31 02:43:41 +00:00
fix test failure
This commit is contained in:
@@ -349,10 +349,12 @@ proc splitFile*(path: string): tuple[dir, name, ext: string] {.
|
||||
## If `path` has no extension, `ext` is the empty string.
|
||||
## If `path` has no directory component, `dir` is the empty string.
|
||||
## If `path` has no filename component, `name` and `ext` are empty strings.
|
||||
if path.len == 0 or path[^1] in {DirSep, AltSep}:
|
||||
if path.len == 0:
|
||||
result = ("", "", "")
|
||||
elif path[^1] in {DirSep, AltSep}:
|
||||
if path.len == 1:
|
||||
# issue #8255
|
||||
result = (path[0 .. ^1], "", "")
|
||||
result = ($path[0], "", "")
|
||||
else:
|
||||
result = (path[0 ..< ^1], "", "")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user