mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob(). (Merge 3.4->3.5)
This commit is contained in:
commit
520f297eb4
3 changed files with 22 additions and 2 deletions
|
@ -541,7 +541,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