diff options
author | Guido van Rossum <guido@python.org> | 2016-01-06 18:35:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2016-01-06 18:35:30 (GMT) |
commit | 520f297eb4d85a99bee8a22d60c4139b8a443d94 (patch) | |
tree | 1918ea6e2adf104c73a10c90b57ed1f12faef6e0 /Lib/pathlib.py | |
parent | d54377d2cabe6a2057468136ba1f29f48d1b47b7 (diff) | |
parent | 69bfb15bd8cb87dd07f1cf6c53f78b399c7ef937 (diff) | |
download | cpython-520f297eb4d85a99bee8a22d60c4139b8a443d94.zip cpython-520f297eb4d85a99bee8a22d60c4139b8a443d94.tar.gz cpython-520f297eb4d85a99bee8a22d60c4139b8a443d94.tar.bz2 |
Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob(). (Merge 3.4->3.5)
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r-- | Lib/pathlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 1ab656c..d03aede 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -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 |