forked from qt-creator/qt-creator
Utils: Fix FilePath::searchInPath remotely
Change-Id: I49bd7fd96427b55d28743eab277c72710a2ac6c0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -140,13 +140,10 @@ static FilePath searchInDirectory(const QStringList &execs,
|
||||
if (directory.isEmpty() || alreadyChecked.count() == checkedCount)
|
||||
return FilePath();
|
||||
|
||||
const QString dir = directory.toString();
|
||||
|
||||
QFileInfo fi;
|
||||
for (const QString &exec : execs) {
|
||||
fi.setFile(dir, exec);
|
||||
if (fi.isFile() && fi.isExecutable())
|
||||
return FilePath::fromString(fi.absoluteFilePath());
|
||||
const FilePath filePath = directory.pathAppended(exec);
|
||||
if (filePath.isExecutableFile())
|
||||
return filePath;
|
||||
}
|
||||
return FilePath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user