refactor: add ignore_permission_denied option to watch function

This commit is contained in:
Yutaka Matsubara 2025-03-10 21:55:00 +09:00
parent 74ecdf2d3f
commit 0be5d39453

View file

@ -140,7 +140,10 @@ class FileWatcher:
roots_to_watch = self.get_roots_to_watch() roots_to_watch = self.get_roots_to_watch()
for changes in watch( for changes in watch(
*roots_to_watch, watch_filter=self.filter_func, stop_event=self.stop_event *roots_to_watch,
watch_filter=self.filter_func,
stop_event=self.stop_event,
ignore_permission_denied=True,
): ):
if self.handle_changes(changes): if self.handle_changes(changes):
return return