summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib/_abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pathlib/_abc.py')
-rw-r--r--Lib/pathlib/_abc.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pathlib/_abc.py b/Lib/pathlib/_abc.py
index b51ad6f..05698d5 100644
--- a/Lib/pathlib/_abc.py
+++ b/Lib/pathlib/_abc.py
@@ -705,10 +705,8 @@ class PathBase(PurePathBase):
anchor, parts = pattern._stack
if anchor:
raise NotImplementedError("Non-relative patterns are unsupported")
- if not self.is_dir():
- return iter([])
select = self._glob_selector(parts, case_sensitive, recurse_symlinks)
- return select(self, exists=True)
+ return select(self)
def rglob(self, pattern, *, case_sensitive=None, recurse_symlinks=True):
"""Recursively yield all existing files (of any kind, including