os.walkDir: correctly evaluate paths when relative = true (#10057) [backport]
This commit is contained in:
parent
52e36a19a9
commit
b6257f3f21
2 changed files with 13 additions and 4 deletions
|
|
@ -189,6 +189,14 @@ block walkDirRec:
|
|||
|
||||
removeDir("walkdir_test")
|
||||
|
||||
when not defined(windows):
|
||||
block walkDirRelative:
|
||||
createDir("walkdir_test")
|
||||
createSymlink(".", "walkdir_test/c")
|
||||
for k, p in walkDir("walkdir_test", true):
|
||||
doAssert k == pcLinkToDir
|
||||
removeDir("walkdir_test")
|
||||
|
||||
block normalizedPath:
|
||||
doAssert normalizedPath("") == ""
|
||||
block relative:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue