Skip to content

Commit 7d8162c

Browse files
WaridleyRay Redondo
authored and
Ray Redondo
committed
Prepend root_path to meta path in HttpWasmAssetReader (bevyengine#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.
1 parent e81d66e commit 7d8162c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_asset/src/io/wasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl AssetReader for HttpWasmAssetReader {
7777
path: &'a Path,
7878
) -> BoxedFuture<'a, Result<Box<Reader<'a>>, AssetReaderError>> {
7979
Box::pin(async move {
80-
let meta_path = get_meta_path(path);
80+
let meta_path = get_meta_path(&self.root_path.join(path));
8181
Ok(self.fetch_bytes(meta_path).await?)
8282
})
8383
}

0 commit comments

Comments
 (0)