From e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 25 Oct 2018 07:19:02 -0400 Subject: 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 --- Source/cmGlobalVisualStudioGenerator.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 4aa52c3..da3daf8 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/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(); } -- cgit v0.12