mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
Merge pull request #8976 from fragcolor-xyz/length-one-dirnames
Allow subpaths with single character names
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user