mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob().
This commit is contained in:
parent
6c2d33a258
commit
69bfb15bd8
3 changed files with 22 additions and 2 deletions
|
@ -496,7 +496,7 @@ class _RecursiveWildcardSelector(_Selector):
|
|||
yield parent_path
|
||||
for name in listdir(parent_path):
|
||||
path = parent_path._make_child_relpath(name)
|
||||
if is_dir(path):
|
||||
if is_dir(path) and not path.is_symlink():
|
||||
for p in self._iterate_directories(path, is_dir, listdir):
|
||||
yield p
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue