mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 04:10:05 -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,
|
const std::string& projectName,
|
||||||
bool dryRun)
|
bool dryRun)
|
||||||
{
|
{
|
||||||
std::string buildDir = cmSystemTools::ConvertToOutputPath(bindir);
|
std::string sln = bindir + "/" + projectName + ".sln";
|
||||||
std::string sln = buildDir + "\\" + projectName + ".sln";
|
|
||||||
|
|
||||||
if (dryRun) {
|
if (dryRun) {
|
||||||
return cmSystemTools::FileExists(sln, true);
|
return cmSystemTools::FileExists(sln, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sln = cmSystemTools::ConvertToOutputPath(sln);
|
||||||
|
|
||||||
return std::async(std::launch::async, OpenSolution, sln).get();
|
return std::async(std::launch::async, OpenSolution, sln).get();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user