mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
Fix bug in removeDotSegments when path ends with dot (#17038) [backport:1.2]
(cherry picked from commit 8f54d3b792)
This commit is contained in:
@@ -284,7 +284,7 @@ proc removeDotSegments(path: string): string =
|
||||
discard collection.pop()
|
||||
i.inc 3
|
||||
continue
|
||||
elif path[i+1] == '/':
|
||||
elif i + 1 < path.len and path[i+1] == '/':
|
||||
i.inc 2
|
||||
continue
|
||||
currentSegment.add path[i]
|
||||
|
||||
Reference in New Issue
Block a user