diff --git a/crates/bevy_asset/src/io/file/file_watcher.rs b/crates/bevy_asset/src/io/file/file_watcher.rs index 1a4bc4cffa427..03351278ea6fe 100644 --- a/crates/bevy_asset/src/io/file/file_watcher.rs +++ b/crates/bevy_asset/src/io/file/file_watcher.rs @@ -46,17 +46,6 @@ impl FileWatcher { let (path, _) = get_asset_path(&owned_root, &event.paths[0]); sender.send(AssetSourceEvent::AddedFolder(path)).unwrap(); } - notify::EventKind::Modify(ModifyKind::Any) => { - let (path, is_meta) = - get_asset_path(&owned_root, &event.paths[0]); - if event.paths[0].is_dir() { - // modified folder means nothing in this case - } else if is_meta { - sender.send(AssetSourceEvent::ModifiedMeta(path)).unwrap(); - } else { - sender.send(AssetSourceEvent::ModifiedAsset(path)).unwrap(); - }; - } notify::EventKind::Access(AccessKind::Close(AccessMode::Write)) => { let (path, is_meta) = get_asset_path(&owned_root, &event.paths[0]); @@ -134,6 +123,17 @@ impl FileWatcher { } } } + notify::EventKind::Modify(_) => { + let (path, is_meta) = + get_asset_path(&owned_root, &event.paths[0]); + if event.paths[0].is_dir() { + // modified folder means nothing in this case + } else if is_meta { + sender.send(AssetSourceEvent::ModifiedMeta(path)).unwrap(); + } else { + sender.send(AssetSourceEvent::ModifiedAsset(path)).unwrap(); + }; + } notify::EventKind::Remove(RemoveKind::File) => { let (path, is_meta) = get_asset_path(&owned_root, &event.paths[0]);