Filesystem watcher fails for assets not in root path
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.5 (Confirmed code same in `main` branch though)
## Operating system & version
Windows 11
## What you did
- Loaded asset from an absolute path, which was not under the `assets` folder, using `asset_server.load()`.
- Called `asset_server.watch_for_changes()`
- After successful initial load, changed file contents.
## What you expected to happen
The asset should reload
## What actually happened
Bevy panicked:
```
thread 'Compute Task Pool (3)' panicked at 'called `Result::unwrap()` on an `Err` value: StripPrefixError(())', ...
```
at https://github.com/bevyengine/bevy/blob/c5717b5a9124c7c2f7431c4be07f15243ebd60b5/crates/bevy_asset/src/io/file_asset_io.rs#L135
## Additional information
The file watcher incorrectly assumes all assets must exist below the `assets` folder.
Contributor guide
Assessment
This issue has not been assessed yet.