瀏覽代碼

ENH: Command should also be quoted

Andy Cedilnik 22 年之前
父節點
當前提交
b79c2f5a4c
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      Source/cmake.cxx

+ 5 - 2
Source/cmake.cxx

@@ -672,11 +672,14 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
     else if (args[1] == "chdir" && args.size() >= 4)
       {
       std::string directory = args[2];
-      std::string command = args[3];
+      std::string command = "\"";
+      command += args[3];
+      command += "\"";
       for (std::string::size_type cc = 4; cc < args.size(); cc ++)
         {
-        command += " ";
+        command += " \"";
         command += args[cc];
+        command += "\"";
         }
 
       int retval = 0;