pathlib: fix symlinked directories not followed during collection

This commit is contained in:
Ran Benita
2020-10-31 13:55:02 +02:00
parent a7e38c5c61
commit 6cdae8ed40
3 changed files with 12 additions and 1 deletions

View File

@@ -558,7 +558,7 @@ def visit(
entries = sorted(os.scandir(path), key=lambda entry: entry.name)
yield from entries
for entry in entries:
if entry.is_dir(follow_symlinks=False) and recurse(entry):
if entry.is_dir() and recurse(entry):
yield from visit(entry.path, recurse)