Better handle file- or path-names with spaces

This commit is contained in:
Axel Kohlmeyer
2022-05-26 21:40:33 -04:00
parent 5f811f852f
commit e2dd08a93e
4 changed files with 7 additions and 5 deletions

View File

@ -102,7 +102,7 @@ public:
BEGIN_HIDE_OUTPUT();
std::string converted_file = compressed_file.substr(0, compressed_file.find_last_of('.'));
std::string cmdline =
fmt::format("{} -d -c {} > {}", COMPRESS_EXECUTABLE, compressed_file, converted_file);
fmt::format("\"{}\" -d -c {} > {}", COMPRESS_EXECUTABLE, compressed_file, converted_file);
system(cmdline.c_str());
END_HIDE_OUTPUT();
return converted_file;