From 8e41a401b0eb69a7f949b73841b9bcec3ad32100 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Aug 2021 13:14:14 +0200 Subject: [PATCH] Utils: Fix pathchooser auto-search-in-path for remote cases Amends 11a40e02f220c. Environment::searchInPath only works for local setups, the remote replacement is FilePath::searchOnDevice. Change-Id: I8a2ba51903d3308ca9198fbf1154779c78e69e63 Reviewed-by: Christian Stenger --- src/libs/utils/pathchooser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index f96813b1afc..d596a27712a 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -220,7 +220,9 @@ FilePath PathChooserPrivate::expandedPath(const QString &input) const switch (m_acceptingKind) { case PathChooser::Command: case PathChooser::ExistingCommand: { - const FilePath expanded = m_environment.searchInPath(path.path(), {m_baseDirectory}); + FilePaths searchPaths = m_environment.path(); + searchPaths.append(m_baseDirectory); + const FilePath expanded = path.searchOnDevice(searchPaths); return expanded.isEmpty() ? path : expanded; } case PathChooser::Any: