diff options
author | Brad King <brad.king@kitware.com> | 2018-10-25 11:19:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-25 11:32:26 (GMT) |
commit | e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c (patch) | |
tree | aab0d3b18d8411fb531340bc314049062aa8ea60 /Source | |
parent | fd02538974dd952a8639d371c2c0067d30d5469a (diff) | |
download | CMake-e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c.zip CMake-e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c.tar.gz CMake-e178bd46cbf2ddaf2e4d0e913986d4ff2320e22c.tar.bz2 |
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')
-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 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(); } |