diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml index 61a1f4dec6612..bd6874d683f83 100644 --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -30,7 +30,7 @@ anyhow = "1.0.4" thiserror = "1.0" downcast-rs = "1.2.0" fastrand = "1.7.0" -notify = { version = "=5.0.0-pre.15", optional = true } +notify = { version = "5.0.0", optional = true } parking_lot = "0.12.1" [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/crates/bevy_asset/src/filesystem_watcher.rs b/crates/bevy_asset/src/filesystem_watcher.rs index 5ee499e80e3ed..ace2500cd5b8f 100644 --- a/crates/bevy_asset/src/filesystem_watcher.rs +++ b/crates/bevy_asset/src/filesystem_watcher.rs @@ -1,5 +1,5 @@ use crossbeam_channel::Receiver; -use notify::{Event, RecommendedWatcher, RecursiveMode, Result, Watcher}; +use notify::{Config, Event, RecommendedWatcher, RecursiveMode, Result, Watcher}; use std::path::Path; /// Watches for changes to files on the local filesystem. @@ -14,9 +14,12 @@ pub struct FilesystemWatcher { impl Default for FilesystemWatcher { fn default() -> Self { let (sender, receiver) = crossbeam_channel::unbounded(); - let watcher: RecommendedWatcher = RecommendedWatcher::new(move |res| { - sender.send(res).expect("Watch event send failure."); - }) + let watcher: RecommendedWatcher = RecommendedWatcher::new( + move |res| { + sender.send(res).expect("Watch event send failure."); + }, + Config::default(), + ) .expect("Failed to create filesystem watcher."); FilesystemWatcher { watcher, receiver } }