summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-25 11:19:02 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-25 11:32:26 (GMT)
commite178bd46cbf2ddaf2e4d0e913986d4ff2320e22c (patch)
treeaab0d3b18d8411fb531340bc314049062aa8ea60 /Source
parentfd02538974dd952a8639d371c2c0067d30d5469a (diff)
downloadCMake-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.cxx5
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();
}