Fixed paths with spaces not being able to compress properly.

Needs testing on Linux and Mac!
This commit is contained in:
MelonSpeedruns 2025-05-07 09:25:53 -04:00
parent 989a86b369
commit 3dfd9814de

View file

@ -974,7 +974,7 @@ 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) {