]> 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)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 20 Aug 2022 11:30:27 +0000 (13:30 +0200)
(cherry picked from commit bb024c69353cd34145c72d3a64fc94604e0407ce)

src/execute.cpp

index 8f4e787a577dc24a590339a64cac1c82c673bbf2..951ba7fd224adc1775702bf0c81f697c62df39be 100644 (file)
@@ -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);
   }