Commit 8b6ad495 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

locations runner: Fix empty list on invalid shell quotes

parent ec751bf1
......@@ -53,9 +53,12 @@ void LocationsRunner::match(Plasma::RunnerContext &context)
QString term = context.query();
// If we have a query with an executable and optionally arguments, BUG: 433053
QFileInfo tmpInfo(KShell::tildeExpand(KShell::splitArgs(term).constFirst()));
if (tmpInfo.isFile() && tmpInfo.isExecutable()) {
const QStringList split = KShell::splitArgs(term);
if (!split.isEmpty()) {
QFileInfo tmpInfo(KShell::tildeExpand(split.constFirst()));
if (tmpInfo.isFile() && tmpInfo.isExecutable()) {
// We want to expand ENV variables like $HOME to get the actual path, BUG: 358221
KUriFilter::self()->filterUri(term, {QStringLiteral("kshorturifilter")});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment