From c5d60eeaf1bf6ecac4de41ed3196d756f84389ac Mon Sep 17 00:00:00 2001 From: Doronin Stanislav Date: Mon, 14 Feb 2022 15:24:53 +0300 Subject: [PATCH] do not add executable suffix more than once --- src/plugins/projectexplorer/gcctoolchain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index a194f3f8f3..cbfadedc56 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1142,12 +1142,12 @@ static FilePaths findCompilerCandidates(const IDevice::ConstPtr &device, if (ccachePath.exists() && !searchPaths.contains(ccachePath)) searchPaths << ccachePath; } + nameFilters = transform(nameFilters, [](const QString &baseName) { + return HostOsInfo::withExecutableSuffix(baseName); + }); for (const FilePath &dir : qAsConst(searchPaths)) { static const QRegularExpression regexp(binaryRegexp); QDir binDir(dir.toString()); - nameFilters = transform(nameFilters, [](const QString &baseName) { - return HostOsInfo::withExecutableSuffix(baseName); - }); const QStringList fileNames = binDir.entryList(nameFilters, QDir::Files | QDir::Executable); for (const QString &fileName : fileNames) { -- 2.32.0.windows.2