mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user