Utils: Use the path from the current object

... in Environment::searchInPath().

Amends 6ab66690.

Change-Id: I04984c6a84c4448a6cd6d4d2677c84ed54376fee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2023-05-30 10:09:50 +02:00
parent 369ade4c1c
commit 6286ae9853

View File

@@ -223,7 +223,8 @@ FilePath Environment::searchInPath(const QString &executable,
const FilePathPredicate &filter) const const FilePathPredicate &filter) const
{ {
const FilePath exec = FilePath::fromUserInput(expandVariables(executable)); const FilePath exec = FilePath::fromUserInput(expandVariables(executable));
return exec.searchInPath(additionalDirs, {}, filter, FilePath::WithAnySuffix); const FilePaths dirs = path() + additionalDirs;
return exec.searchInDirectories(dirs, filter, FilePath::WithAnySuffix);
} }
FilePaths Environment::path() const FilePaths Environment::path() const