From fb395d6dc141e2194d6bc90d30585e260abe6ed2 Mon Sep 17 00:00:00 2001 From: Pengfei Date: Sat, 7 Aug 2021 14:36:47 +0800 Subject: [PATCH] Convenience - detect auto_filename --- src/core/importer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/importer.cpp b/src/core/importer.cpp index a0c8c26..c2275f5 100644 --- a/src/core/importer.cpp +++ b/src/core/importer.cpp @@ -631,6 +631,9 @@ bool SDMCImporter::DumpCXI(const ContentSpecifier& specifier, std::string destin dump_cxi_ncch = std::make_unique( std::make_shared(config.sdmc_path, boot_content_path, "rb")); + if (destination.back() == '/' || destination.back() == '\\') { + auto_filename = true; + } if (auto_filename) { if (destination.back() != '/' && destination.back() != '\\') { destination.push_back('/'); @@ -699,6 +702,9 @@ bool SDMCImporter::BuildCIA(CIABuildType build_type, const ContentSpecifier& spe : fmt::format("{}title/{:08x}/{:08x}/content/", config.sdmc_path, (specifier.id >> 32), (specifier.id & 0xFFFFFFFF)); + if (destination.back() == '/' || destination.back() == '\\') { + auto_filename = true; + } static constexpr std::array BuildTypeExts{{ "standard.cia", "piratelegit.cia",