Closed
Description
Bevy version
0.15
What you did
I have the AssetPlugin
configured like this, which worked fine in past bevy versions (and in 0.15 still at least correctly loads assets from that path):
AssetPlugin {
file_path: "../../assets".into(),
watch_for_changes_override: Some(true),
mode: AssetMode::Unprocessed,
..Default::default()
}
I use a path with ..
here, since my asset directory is in the workspace root, while bevy by default expects it in the crate initializing the engine.
What went wrong
Upon changing a file in the assets directory, the file watcher thread panics like this:
thread 'notify-rs debouncer loop' panicked at /home/sludge/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_asset-0.15.1/src/io/file/file_watcher.rs:51:9:
FileWatcher::get_asset_path() failed to strip prefix from absolute path: absolute_path="/home/sludge/code/Artifice/crates/artifice/../../assets/artifice_sludge/rasterize/blend.wgsl", root="/home/sludge/code/Artifice/assets"
Seems like the produced path needs to be normalized somewhere.