From 9f4c3e943ac3b43ddf56d6b43209ee1c1bb44dc0 Mon Sep 17 00:00:00 2001 From: Waridley Date: Mon, 13 Nov 2023 19:29:22 -0600 Subject: [PATCH] Prepend `root_path` to meta path in HttpWasmAssetReader (#10527) # Objective Fixes an issue where Bevy will look for `.meta` files in the root of the server instead of `imported_assets/Default` on the web. ## Solution `self.root_path.join` was seemingly forgotten in the `read_meta` function on `HttpWasmAssetReader`, though it was included in the `read` function. This PR simply adds the missing function call. --- crates/bevy_asset/src/io/wasm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_asset/src/io/wasm.rs b/crates/bevy_asset/src/io/wasm.rs index 99ff39799b..2636419299 100644 --- a/crates/bevy_asset/src/io/wasm.rs +++ b/crates/bevy_asset/src/io/wasm.rs @@ -77,7 +77,7 @@ impl AssetReader for HttpWasmAssetReader { path: &'a Path, ) -> BoxedFuture<'a, Result>, AssetReaderError>> { Box::pin(async move { - let meta_path = get_meta_path(path); + let meta_path = get_meta_path(&self.root_path.join(path)); Ok(self.fetch_bytes(meta_path).await?) }) }