summary refs log tree commit diff stats
path: root/compiler/pathutils.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-15 17:31:40 +0200
committerGitHub <noreply@github.com>2018-09-15 17:31:40 +0200
commitb9b611a2b97bbdf573c03e56205ce0ad08aa168e (patch)
treec7b6bee07d4acf137cf0e56faa26fd770dc70305 /compiler/pathutils.nim
parent2745111fc333d58f663480639aae5b2e0e0e1636 (diff)
parente4af0fcb6dc2e6d90a89708a1cae0edbeb0b30e4 (diff)
downloadNim-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.nim2
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])