mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Unwatch paths when they're reported as removed
This commit is contained in:
parent
3a029caf2b
commit
00a29bb6be
1 changed files with 8 additions and 2 deletions
|
|
@ -147,8 +147,14 @@ impl VfsLock {
|
||||||
self.backend.event_receiver()
|
self.backend.event_receiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn commit_event(&mut self, _event: &VfsEvent) -> io::Result<()> {
|
pub fn commit_event(&mut self, event: &VfsEvent) -> io::Result<()> {
|
||||||
// Because we hold no state, there's no cache to update here.
|
match event {
|
||||||
|
VfsEvent::Remove(path) => {
|
||||||
|
let _ = self.backend.unwatch(&path);
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue