Skip to content

Commit

Permalink
fix: linux file watching did not detect recreate
Browse files Browse the repository at this point in the history
The notify crate does not properly handle watching of recreated files on
all platform. This commit instead watches the parent directory as
proposed in the documentation of Notify.

See: notify-rs/notify#166
  • Loading branch information
baszalmstra committed Nov 19, 2019
1 parent 7aba4fe commit 98ae497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/mun_runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Runtime {
assembly.link(&self.dispatch_table)?;

self.watcher
.watch(library_path.clone(), RecursiveMode::NonRecursive)?;
.watch(library_path.parent().unwrap(), RecursiveMode::NonRecursive)?;

self.assemblies.insert(library_path, assembly);
Ok(())
Expand Down

0 comments on commit 98ae497

Please sign in to comment.