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
"Illegal characters in path" from GBC rom being treated as an Archive #2587
Comments
Extensions other than zip,7z,rar,gz,bz2,xz should not be candidates for testing for IsArchiveness |
Current theory is you're testing a .gbc extension to see if it's an archive, else you wouldnt get a chance to find a TAR magic number in it |
When `HawkFile` is iterating over archive members of its root trying to bind one, if it finds one with an invalid name, it will instead bind the root as a non-archive. This behaviour can be overridden with `forceArchiveMember: true`, which will result in nothing bound instead of the root being bound.
^ thoughts? (also let me know if the debugger attr works, I grabbed it off SO) |
I'm inclined to agree with zeromus that it's not ideal that you'd even need to try to recover from reading a file with a .gb/,gbc extension as an archive in the first place, but perhaps that commit is still useful for cases like the .lsmv where something not expected to be an archive by extension turns out to be one. |
If we want to support something, we want to be clear about it, to ourselves and others. lsnes is one of the few emulators that uses plain renamed zip, so it's easier to support it explicitly. Implicit support is accidental and relies on luck, and we want to not depend on luck, for us and users. |
#2589 gets the HawkFile dependency out of lsmv import, so we can stop worrying about that for this. |
Well and truly fixed now. OP's rom, and I assume those from other reports, don't even have the magic bytes of a modern I still think 0ba29e7 is a good idea, just not sure if it's the best implementation. I think the ideal is to try incoming files as roms first, then archives (or concurrently, but the precedence should be for roms). Refactoring |
The Emperor's New Groove ROM for GBC is treated as an archive causing an exception in the ROMLoader
Repro
Try to load the above rom
Output
The text was updated successfully, but these errors were encountered: