]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix(win32execute): Handle space in paths when using response file (#1080)
authorSergey Semushin <Predelnik@gmail.com>
Thu, 26 May 2022 16:46:36 +0000 (19:46 +0300)
committerGitHub <noreply@github.com>
Thu, 26 May 2022 16:46:36 +0000 (18:46 +0200)
src/execute.cpp

index 2355c622f0b71ebc3238c39911a25ba276e6f9b6..801349b8329d0c752088dcd139f725d9ebd8c21c 100644 (file)
@@ -149,7 +149,7 @@ win32execute(const char* path,
     TemporaryFile tmp_file(FMT("{}/cmd_args", temp_dir));
     args = Win32Util::argv_to_string(argv + 1, sh, true);
     Util::write_fd(*tmp_file.fd, args.data(), args.length());
-    args = FMT("{} @{}", full_path, tmp_file.path);
+    args = FMT(R"("{}" "@{}")", full_path, tmp_file.path);
     tmp_file_path = tmp_file.path;
     LOG("Arguments from {}", tmp_file.path);
   }