11
0
Files
plasma5-workspace/0001-locations-runner-Fix-absolute-filepath-arguments.patch
Luca Beltrame 2e23bd6312 Accepting request 873375 from home:Vogtinator:plasma5.21
- Add patch to fix starting applications with arguments from krunner
  (kde#433053):
  * 0001-locations-runner-Fix-absolute-filepath-arguments.patch

OBS-URL: https://build.opensuse.org/request/show/873375
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=572
2021-02-18 21:40:42 +00:00

32 lines
1.1 KiB
Diff

From 7070394fb3779032f20b8165de5b5d6b9f104b3a Mon Sep 17 00:00:00 2001
From: Alexander Lohnau <alexander.lohnau@gmx.de>
Date: Wed, 17 Feb 2021 16:23:56 +0100
Subject: [PATCH] locations runner: Fix absolute filepath + arguments
The KUriFilter would interpret this as a path and consequently
produce a result.
BUG: 433053
FIXED-IN: 5.21
---
runners/locations/locationrunner.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/runners/locations/locationrunner.cpp b/runners/locations/locationrunner.cpp
index be1be7e6a..175c07023 100644
--- a/runners/locations/locationrunner.cpp
+++ b/runners/locations/locationrunner.cpp
@@ -52,7 +52,8 @@ LocationsRunner::~LocationsRunner()
void LocationsRunner::match(Plasma::RunnerContext &context)
{
QString term = context.query();
- QFileInfo tmpInfo(KShell::tildeExpand(term));
+ // 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()) {
return;
}
--
2.25.1