mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
Fix for running extractor without optional game flag (#3896)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
@@ -92,7 +92,8 @@ std::tuple<std::optional<ISOMetadata>, ExtractorErrorCode> validate(
|
||||
}
|
||||
lg::error("Overall ISO content's hash does not match. Expected '{}', Actual '{}'", all_expected,
|
||||
expected_hash);
|
||||
return {std::nullopt, ExtractorErrorCode::VALIDATION_FILE_CONTENTS_UNEXPECTED};
|
||||
return {std::make_optional(version_info),
|
||||
ExtractorErrorCode::VALIDATION_FILE_CONTENTS_UNEXPECTED};
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -302,6 +303,7 @@ int main(int argc, char** argv) {
|
||||
// We know the version since we just extracted it, so the user didn't need to provide this
|
||||
// explicitly
|
||||
data_subfolder = data_subfolders.at(version_info->game_name);
|
||||
game_name = version_info->game_name;
|
||||
if (!extraction_path.empty()) {
|
||||
iso_data_path = extraction_path / data_subfolder;
|
||||
} else {
|
||||
@@ -337,6 +339,10 @@ int main(int argc, char** argv) {
|
||||
(flag_fail_on_validation && validate_code != ExtractorErrorCode::SUCCESS)) {
|
||||
return static_cast<int>(validate_code);
|
||||
}
|
||||
if (version_info) {
|
||||
data_subfolder = data_subfolders.at(version_info->game_name);
|
||||
game_name = version_info->game_name;
|
||||
}
|
||||
}
|
||||
|
||||
// write out a json file with some metadata for the game
|
||||
|
||||
Reference in New Issue
Block a user