This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Epic_Wink
Recipients Epic_Wink, SilentGhost, p-ganssle, pitrou, steve.dower, xtreak
Date 2019-04-13.03:10:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555125034.54.0.0542768522838.issue36602@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-04-13 03:10:34Epic_Winksetrecipients: + Epic_Wink, pitrou, SilentGhost, steve.dower, p-ganssle, xtreak
2019-04-13 03:10:34Epic_Winksetmessageid: <1555125034.54.0.0542768522838.issue36602@roundup.psfhosted.org>
2019-04-13 03:10:34Epic_Winklinkissue36602 messages
2019-04-13 03:10:34Epic_Winkcreate