summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Semushin <Predelnik@gmail.com>2022-05-26 19:46:36 +0300
committerJoel Rosdahl <joel@rosdahl.net>2022-08-20 13:30:27 +0200
commit9aa7bb4b7b9bbf0277531885f5ade0a71152f37a (patch)
tree9a7c4f647841b6d77bb35f826388ed98752ef500
parent84c78bf29b73bfdfddb53d743d840db5c8915775 (diff)
downloadccache-9aa7bb4b7b9bbf0277531885f5ade0a71152f37a.tar.gz
fix(win32execute): Handle space in paths when using response file (#1080)
(cherry picked from commit bb024c69353cd34145c72d3a64fc94604e0407ce)
-rw-r--r--src/execute.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/execute.cpp b/src/execute.cpp
index 8f4e787a..951ba7fd 100644
--- a/src/execute.cpp
+++ b/src/execute.cpp
@@ -151,7 +151,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);
}