Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix top-level error handling.
  • Loading branch information
barneygale committed Mar 12, 2023
commit e850bde979b7ffb311f5f27b06154e98cb450c3f
4 changes: 4 additions & 0 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def select_from(self, parent_path, follow_symlinks):
path_cls = type(parent_path)
scandir = path_cls._scandir
normcase = path_cls._flavour.normcase
if not follow_symlinks and parent_path.is_symlink():
return iter([])
if not parent_path.is_dir():
return iter([])
return self._select_from(parent_path, follow_symlinks, scandir, normcase)


Expand Down