Skip to content

Commit 7fd09a9

Browse files
committed
Use PollWatcher to always get filesystem updates
See #2102 (comment) for explanation on this Closes #2102, #2035, #383 and #1441
1 parent 6f6de2c commit 7fd09a9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/cmd/watch.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,15 @@ where
107107

108108
// Create a channel to receive the events.
109109
let (tx, rx) = channel();
110-
111-
let mut debouncer = match notify_debouncer_mini::new_debouncer(Duration::from_secs(1), None, tx)
112-
{
110+
// Notify backend configuration
111+
let backend_config = notify::Config::default().with_poll_interval(Duration::from_secs(1));
112+
113+
let mut debouncer = match notify_debouncer_mini::new_debouncer_opt::<_, notify::PollWatcher>(
114+
Duration::from_secs(1),
115+
None,
116+
tx,
117+
backend_config,
118+
) {
113119
Ok(d) => d,
114120
Err(e) => {
115121
error!("Error while trying to watch the files:\n\n\t{:?}", e);

0 commit comments

Comments
 (0)