@@ -278,13 +278,6 @@ static bool simplifyPathWithVariables(std::string &s, VariablesMap &variables)
278278 return true ;
279279}
280280
281- static std::string toAbsolute (const std::string &path)
282- {
283- if (Path::isAbsolute (path))
284- return Path::simplifyPath (path);
285- return Path::simplifyPath (Path::getCurrentPath () + " /" + path);
286- }
287-
288281static std::string toAbsolute (const std::string &filename, const std::string &baseDir, VariablesMap &variables)
289282{
290283 std::string resolved (filename);
@@ -360,7 +353,7 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
360353 return ImportProject::Type::VS_SLNX ;
361354 }
362355 } else if (endsWith (filename, " .vcxproj" )) {
363- if (importVcxproj (toAbsolute (filename), mVariables , fileFilters)) {
356+ if (importVcxproj (Path::getAbsoluteFilePath (filename), mVariables , fileFilters)) {
364357 setRelativePaths (filename);
365358 return ImportProject::Type::VS_VCXPROJ ;
366359 }
@@ -496,7 +489,7 @@ bool ImportProject::importSln(std::istream &istr, const std::string &path, const
496489 }
497490 }
498491
499- const std::string solutionDir = toAbsolute (path);
492+ const std::string solutionDir = Path::getAbsoluteFilePath (path);
500493 mVariables [" SolutionDir" ] = solutionDir;
501494
502495 bool found = false ;
@@ -548,7 +541,7 @@ bool ImportProject::importSlnx(const std::string& filename, const std::vector<st
548541 return false ;
549542 }
550543
551- mVariables [" SolutionDir" ] = toAbsolute (Path::getPathFromFilename (filename));
544+ mVariables [" SolutionDir" ] = Path::getAbsoluteFilePath (Path::getPathFromFilename (filename));
552545
553546 bool found = false ;
554547
0 commit comments