Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - [assets] properly set LoadState with invalid asset extension #2318

Conversation

NathanSWard
Copy link
Contributor

Objective

Solution

  • Add the SourceInfo prior to checking for valid extension loaders. And set the LoadState to Failed if the according loader does not exist.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jun 8, 2021
@NathanSWard NathanSWard added A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior and removed S-Needs-Triage This issue needs to be labelled labels Jun 8, 2021
@NathanSWard NathanSWard requested a review from mockersf June 8, 2021 17:34
@cart
Copy link
Member

cart commented Jun 8, 2021

bors r+

@NathanSWard
Copy link
Contributor Author

NathanSWard commented Jun 8, 2021

bors r+

uhhh, bors where you at??

@NathanSWard
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Jun 8, 2021
@cart
Copy link
Member

cart commented Jun 8, 2021

Weiiird

@cart
Copy link
Member

cart commented Jun 8, 2021

bors r+

bors bot pushed a commit that referenced this pull request Jun 8, 2021
# Objective

- Currently, when calling any of the `AssetServer`'s `load` functions, if the extension does not exist for the given path, the returned handle's load state is always `LoadState::NotLoaded`. 
- This is due to the `load_async` function early returning without properly creating a `SourceInfo` for the requested asset.
- Fixes #2261

## Solution
- Add the `SourceInfo` prior to checking for valid extension loaders. And set the `LoadState` to `Failed` if the according loader does not exist.
@bors bors bot changed the title [assets] properly set LoadState with invalid asset extension [Merged by Bors] - [assets] properly set LoadState with invalid asset extension Jun 8, 2021
@bors bors bot closed this Jun 8, 2021
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
…ngine#2318)

# Objective

- Currently, when calling any of the `AssetServer`'s `load` functions, if the extension does not exist for the given path, the returned handle's load state is always `LoadState::NotLoaded`. 
- This is due to the `load_async` function early returning without properly creating a `SourceInfo` for the requested asset.
- Fixes bevyengine#2261

## Solution
- Add the `SourceInfo` prior to checking for valid extension loaders. And set the `LoadState` to `Failed` if the according loader does not exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssetServer returns LoadState::NotLoaded when trying to load an asset with an invalid extension.
2 participants