Skip to content

Commit

Permalink
Fix package:// asset parsing (#237)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
  • Loading branch information
luca-della-vedova authored Aug 26, 2024
1 parent 47552ea commit 5bbbc0c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
21 changes: 11 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion rmf_site_editor/src/site_asset_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ impl Plugin for SiteAssetIoPlugin {
"package",
BevyAssetSource::build().with_reader(|| {
Box::new(SiteAssetReader::new(|path: &Path| {
let path = (*expand_package_path(path.to_str().unwrap(), None)).to_owned();
let path = (*expand_package_path(
&("package://".to_owned() + path.to_str().unwrap()),
None,
))
.to_owned();
Box::pin(async move { load_from_file(path.into()) })
}))
}),
Expand Down

0 comments on commit 5bbbc0c

Please sign in to comment.