bsputil: better naming of decompiled .map's

This commit is contained in:
Eric Wasylishen 2022-09-19 20:59:47 -06:00
parent ed4e4d1327
commit 5d1dc0d882
1 changed files with 7 additions and 3 deletions

View File

@ -630,9 +630,13 @@ int main(int argc, char **argv)
hullnum = std::stoi(argv[i + 1]);
}
source.replace_extension("");
source.replace_filename(source.stem().string() + "-decompile");
source.replace_extension(".map");
// generate output filename
if (hull) {
source.replace_extension(fmt::format(".decompile.hull{}.map", hullnum));
} else {
source.replace_extension(".decompile.map");
}
fmt::print("-> writing {}...\n", source);
std::ofstream f(source);