소스 검색

cmake-gui: Fix "Open Project" for VS IDE with space in path

Do not encode the path for a shell until after we check that it exists.

Fixes: #18501
Brad King 7 년 전
부모
커밋
e178bd46cb
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      Source/cmGlobalVisualStudioGenerator.cxx

+ 3 - 2
Source/cmGlobalVisualStudioGenerator.cxx

@@ -878,12 +878,13 @@ bool cmGlobalVisualStudioGenerator::Open(const std::string& bindir,
                                          const std::string& projectName,
                                          bool dryRun)
 {
-  std::string buildDir = cmSystemTools::ConvertToOutputPath(bindir);
-  std::string sln = buildDir + "\\" + projectName + ".sln";
+  std::string sln = bindir + "/" + projectName + ".sln";
 
   if (dryRun) {
     return cmSystemTools::FileExists(sln, true);
   }
 
+  sln = cmSystemTools::ConvertToOutputPath(sln);
+
   return std::async(std::launch::async, OpenSolution, sln).get();
 }