Merge pull request #8976 from fragcolor-xyz/length-one-dirnames

Allow subpaths with single character names
This commit is contained in:
Andreas Rumpf
2018-09-15 17:31:40 +02:00
committed by GitHub

View File

@@ -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])