Allow subpaths of names of length 1

This commit is contained in:
Jörg Wollenschläger
2018-09-15 20:22:04 +09:00
parent 4342b79a3c
commit e4af0fcb6d

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