PathChooser: Always return path for existing commands

Always return pathes for existing commands, even if the path is invalid.

Task-number: QTCREATORBUG-4130
This commit is contained in:
Tobias Hunger
2011-04-01 11:47:09 +02:00
parent f6ceffb0d9
commit 7c469ae68b

View File

@@ -226,7 +226,7 @@ QString PathChooserPrivate::expandedPath(const QString &input) const
case PathChooser::Command:
case PathChooser::ExistingCommand: {
const QString expanded = m_environment.searchInPath(path, QStringList(m_baseDirectory));
return expanded.isEmpty() && m_acceptingKind == PathChooser::Command ? path : expanded;
return expanded.isEmpty() ? path : expanded;
}
case PathChooser::Any:
break;