diff --git a/vfs/src/lib.rs b/vfs/src/lib.rs index c4423244..40b8979c 100644 --- a/vfs/src/lib.rs +++ b/vfs/src/lib.rs @@ -147,8 +147,14 @@ impl VfsLock { self.backend.event_receiver() } - pub fn commit_event(&mut self, _event: &VfsEvent) -> io::Result<()> { - // Because we hold no state, there's no cache to update here. + pub fn commit_event(&mut self, event: &VfsEvent) -> io::Result<()> { + match event { + VfsEvent::Remove(path) => { + let _ = self.backend.unwatch(&path); + } + _ => {} + } + Ok(()) } }