Skip to content

Commit

Permalink
Process Asset File Extensions With Multiple Dots
Browse files Browse the repository at this point in the history
Fixes #1276
  • Loading branch information
zicklag committed Jan 21, 2021
1 parent a880b54 commit 20b7cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ impl AssetServer {
path: P,
) -> Result<Arc<Box<dyn AssetLoader>>, AssetServerError> {
path.as_ref()
.extension()
.and_then(|e| e.to_str())
.to_str()
.and_then(|s| s.find(".").map(|x| &s[x + 1..]))
.ok_or(AssetServerError::MissingAssetLoader(None))
.and_then(|extension| self.get_asset_loader(extension))
}
Expand Down

0 comments on commit 20b7cc6

Please sign in to comment.