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
This commit is contained in:
Brad King
2018-10-25 07:19:02 -04:00
parent fd02538974
commit e178bd46cb

View File

@@ -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();
}