diff options
author | Brad King <brad.king@kitware.com> | 2018-10-25 07:19:02 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-25 07:32:26 -0400 |
commit | e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c (patch) | |
tree | aab0d3b18d8411fb531340bc314049062aa8ea60 /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | fd02538974dd952a8639d371c2c0067d30d5469a (diff) | |
download | cmake-e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c.tar.gz |
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
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 4aa52c35c8..da3daf86b2 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(); } |