From e76668356b3bd88053f5b7bb8eff1ac2ce771aeb Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Mon, 7 Jul 2025 01:53:02 -0400 Subject: [PATCH] Fixed paths with spaces not being able to Compress-Archive properly. (#141) * Fixed paths with spaces not being able to compress properly. Needs testing on Linux and Mac! * Fixed path for additional files --- RecompModTool/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecompModTool/main.cpp b/RecompModTool/main.cpp index 760b897..a81f64c 100644 --- a/RecompModTool/main.cpp +++ b/RecompModTool/main.cpp @@ -1005,11 +1005,11 @@ bool create_mod_zip(const std::filesystem::path& output_dir, const ModConfig& co #ifdef _WIN32 std::filesystem::path temp_zip_path = output_path; temp_zip_path.replace_extension(".zip"); - std::string command_string = fmt::format("powershell -command Compress-Archive -Force -CompressionLevel Optimal -DestinationPath \"{}\" -Path \"{}\",\"{}\",\"{}\"", + std::string command_string = fmt::format("powershell -command Compress-Archive -Force -CompressionLevel Optimal -DestinationPath '{}' -Path '{}','{}','{}'", temp_zip_path.string(), (output_dir / symbol_filename).string(), (output_dir / binary_filename).string(), (output_dir / manifest_filename).string()); for (const auto& cur_file : config.inputs.additional_files) { - command_string += fmt::format(",\"{}\"", cur_file.string()); + command_string += fmt::format(",'{}'", cur_file.string()); } STARTUPINFOA si{};