Message340144
Having `iterdir(recursive=True)` recurse into symlinks to directories would mean we would either not yield those symlinks, or we yield those symlinks and all other directories.
I feel like not yielding directories is the way to go, but it's easy enough to check if a yielded path is a directory in application code.
The current implementation of using recursion to list subdirectory contents doesn't seem to allow for the obvious implementation of symlink cycle-detection: keeping track of which (real) directories have been listed.
PS: I've updated the pull-request to not follow symlinks to directories. This is not a final decision, but just updating to be in line with what I've implied up to this point |
|
Date |
User |
Action |
Args |
2019-04-13 03:10:34 | Epic_Wink | set | recipients:
+ Epic_Wink, pitrou, SilentGhost, steve.dower, p-ganssle, xtreak |
2019-04-13 03:10:34 | Epic_Wink | set | messageid: <1555125034.54.0.0542768522838.issue36602@roundup.psfhosted.org> |
2019-04-13 03:10:34 | Epic_Wink | link | issue36602 messages |
2019-04-13 03:10:34 | Epic_Wink | create | |
|