diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-15 17:31:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 17:31:40 +0200 |
commit | b9b611a2b97bbdf573c03e56205ce0ad08aa168e (patch) | |
tree | c7b6bee07d4acf137cf0e56faa26fd770dc70305 /compiler/pathutils.nim | |
parent | 2745111fc333d58f663480639aae5b2e0e0e1636 (diff) | |
parent | e4af0fcb6dc2e6d90a89708a1cae0edbeb0b30e4 (diff) | |
download | Nim-b9b611a2b97bbdf573c03e56205ce0ad08aa168e.tar.gz |
Merge pull request #8976 from fragcolor-xyz/length-one-dirnames
Allow subpaths with single character names
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r-- | compiler/pathutils.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim index ef0fa4abd..03fcfe07e 100644 --- a/compiler/pathutils.nim +++ b/compiler/pathutils.nim @@ -114,7 +114,7 @@ proc canon(x: string; result: var string; state: var int) = if d > 0: setLen(result, d-1) elif isDot(x, b): discard "discard the dot" - elif b[1] > b[0]: + elif b[1] >= b[0]: if result.len > 0 and result[^1] != DirSep: result.add DirSep result.add substr(x, b[0], b[1]) |