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 10, 2020
1 parent fd226d9 commit b501d14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/watchdog/observers/fsevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def queue_events(self, timeout):
cls = DirDeletedEvent if event.is_directory else FileDeletedEvent
self.queue_event(cls(event.path))
self.queue_event(DirModifiedEvent(os.path.dirname(event.path)))

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

i += 1

def run(self):
Expand Down

0 comments on commit b501d14

Please sign in to comment.