diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 7738b74bac8..102441bdf1a 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1022,9 +1022,8 @@ QList GccToolChainFactory::autoDetectToolchains(const QString &comp return result; const FileName canonicalPath = FileUtils::canonicalPath(compilerPath); - result = Utils::filtered(alreadyKnown, [requiredTypeId, canonicalPath](ToolChain *tc) { - return tc->typeId() == requiredTypeId - && FileUtils::canonicalPath(tc->compilerCommand()) == canonicalPath; + result = Utils::filtered(alreadyKnown, [requiredTypeId, compilerPath](ToolChain *tc) { + return tc->typeId() == requiredTypeId && tc->compilerCommand() == compilerPath; }); if (!result.isEmpty()) { for (ToolChain *tc : result) {