Skip to content

Commit

Permalink
properly handle root change event
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Schott committed Dec 11, 2020
1 parent 372cf72 commit 0fd9013
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/watchdog/observers/fsevents.py
Expand Up @@ -123,6 +123,10 @@ def queue_events(self, timeout):
cls = DirDeletedEvent if event.is_directory else FileDeletedEvent
self.queue_event(cls(src_path))
self.queue_event(DirModifiedEvent(os.path.dirname(src_path)))

elif event.is_root_changed:
self.queue_event(DirDeletedEvent(self.watch.path))

i += 1

def run(self):
Expand Down

0 comments on commit 0fd9013

Please sign in to comment.