AssetLoader panics when trying to open a file with no extension #576
Labels
A-Assets
Load files from disk to use for things like images, models, and sounds
P-Crash
A sudden unexpected crash
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
in
0.2.1
, trying to open a file with no extension causes a panic somewhere in the asset loading pipeline, even when the asset loader used has an empty string in it'sextensions(&self) -> &[&str]]
value. Not all files have an extension, so it should be possible to open these files, even if it means creating your ownAssetLoader
. Below is the asset loader that doesn't work. I don't even think it runs, if I place a panic with a specific message in thefrom_bytes
function, the other panics happen before.(as an aside, I think it should be possible to open files that don't match their loader's extensions, as some more general types could accept almost any type, like a loader for
Vec<u8>
orString
)The text was updated successfully, but these errors were encountered: