Skip to content

Commit 9bcaad7

Browse files
authored
Canonicalize the root path to match the canonicalized asset path. (#18345)
# Objective - Fixes #18342. ## Solution - Canonicalize the root path so that when we try to strip the prefix, it matches the canonicalized asset path. - This is basically just a followup to #18023. ## Testing - Ran the hot_asset_reloading example and it no longer panics.
1 parent 6b61e38 commit 9bcaad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_asset/src/io/file/file_watcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl FileWatcher {
3535
sender: Sender<AssetSourceEvent>,
3636
debounce_wait_time: Duration,
3737
) -> Result<Self, notify::Error> {
38-
let root = normalize_path(&path);
38+
let root = normalize_path(&path).canonicalize().unwrap();
3939
let watcher = new_asset_event_debouncer(
4040
path.clone(),
4141
debounce_wait_time,

0 commit comments

Comments
 (0)