From 4bf4f1b5802467d66d41d5f5a4fe12a9908cffc6 Mon Sep 17 00:00:00 2001 From: tripp <86533397+trippjoe@users.noreply.github.com> Date: Sat, 30 Aug 2025 10:59:29 -0400 Subject: [PATCH] Rename `WATER_AN.CGO` to `WATER-AN.CGO` if found during extraction (#3890) During the iso creation process it's possible that this file in will be internally renamed to `WATER_AN.CGO`, despite the external file name displaying `WATER-AN.CGO`. We expect the file to be named `WATER-AN.CGO`. We can't control how our users create their iso files. We can alleviate future friction regarding this matter by adopting this simple change. --------- Co-authored-by: Tyler Wilding --- common/util/read_iso_file.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/util/read_iso_file.cpp b/common/util/read_iso_file.cpp index 4d5051932e..9298008fa8 100644 --- a/common/util/read_iso_file.cpp +++ b/common/util/read_iso_file.cpp @@ -92,7 +92,12 @@ void unpack_entry(FILE* fp, const IsoFile::Entry& entry, const fs::path& dest, bool print_progress) { - fs::path path_to_entry = dest / entry.name; + std::string patched_name = entry.name; + if (entry.name == "WATER_AN.CGO") { + lg::warn("Detected WATER_AN.CGO, renaming to the proper WATER-AN.CGO"); + patched_name = "WATER-AN.CGO"; + } + fs::path path_to_entry = dest / patched_name; if (entry.is_dir) { fs::create_directory(path_to_entry); for (const auto& child : entry.children) { @@ -100,7 +105,7 @@ void unpack_entry(FILE* fp, } } else { if (print_progress) { - lg::info("Extracting {}, size 0x{:x} offset 0x{:x}...", entry.name, entry.size, + lg::info("Extracting {}, size 0x{:x} offset 0x{:x}...", patched_name, entry.size, entry.offset_in_file); } std::vector buffer(entry.size);