mirror of
https://github.com/open-goal/jak-project
synced 2026-07-10 07:07:04 -04:00
Replace assert with user-friendly error if ISO is invalid or not found (#1540)
* Replace assert with user-friendly error if ISO not found When the extractor runs and can't detect a game folder, it will assume there is an ISO file in the directory instead. If there isn't an ISO file, or it's a different extension, it will trigger an assert. This adds an additional check to make sure the file extension is of type `.iso` and returns a more clear message to the user. Once I get home I'll iterate upon this a bit to add file size checks and reading header data as well as making sure the error code is able to be reported to the launcher. * Fix `extension` call & formatting more de-rust lol * fix extension call (again) * fix ONE extra parenthesis * argument incompatible with fmt print will fix print later * add ONE missing parenthesis never taking intellisense for granted again * Add ISO size checks and rework type check * actually print `data_dir_path` :p * Normalize extension case before verifying file type + clang-format * clang-format Co-authored-by: doctashay <doctashay@github.com>
This commit is contained in:
@@ -20,4 +20,10 @@
|
||||
"4030": {
|
||||
"msg": "Decompilation Failed: An error occurred"
|
||||
}
|
||||
"4040": {
|
||||
"msg": "Extraction Failed: Provided game data file was not an ISO file"
|
||||
}
|
||||
"4041": {
|
||||
"msg": "Extraction Failed: Provided game data file was corrupt or has unexpected size"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user