diff --git a/src/watchdog/utils/dirsnapshot.py b/src/watchdog/utils/dirsnapshot.py index 20abe221d..8310405ec 100644 --- a/src/watchdog/utils/dirsnapshot.py +++ b/src/watchdog/utils/dirsnapshot.py @@ -229,7 +229,7 @@ def walk(root): yield _ if recursive: for path, st in entries: - if S_ISDIR(st.st_mode): + if S_ISDIR(st.st_mode) and os.access(path, os.R_OK): for _ in walk(path): yield _