mirror of
https://github.com/open-goal/jak-project
synced 2026-06-10 12:55:45 -04:00
extractor: support extracting using a folder path (#3422)
Patching up the extractor while working on the launcher, fixes: - makes it so you can compile successfully given a folder path (currently assumes your project path contains `iso_data`) - ignore `buildinfo.json` from validation code. - fixes an edge-case that could recursively fill up your entire hard-drive! - allows overriding the decompilation configuration via flag - adds a way to specify where the ISO should be extracted to
This commit is contained in:
@@ -267,6 +267,11 @@ std::tuple<uint64_t, int> calculate_extraction_hash(const fs::path& extracted_is
|
||||
int filec = 0;
|
||||
for (auto const& dir_entry : fs::recursive_directory_iterator(extracted_iso_path)) {
|
||||
if (dir_entry.is_regular_file()) {
|
||||
// skip the `buildinfo.json` file, we make that -- not relevant!
|
||||
if (dir_entry.path().filename() == "buildinfo.json") {
|
||||
lg::warn("skipping buildinfo.json, that is a file our tools generate");
|
||||
continue;
|
||||
}
|
||||
auto buffer = file_util::read_binary_file(dir_entry.path().string());
|
||||
auto hash = XXH64(buffer.data(), buffer.size(), 0);
|
||||
combined_hash ^= hash;
|
||||
|
||||
Reference in New Issue
Block a user