Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Update
kio
0001-OpenUrlJob-fix-support-for-shell-scripts-w...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-OpenUrlJob-fix-support-for-shell-scripts-with-a-spac.patch of Package kio
From 329a20c90be895355a2ddd9c5bd9ce6cfce6bee5 Mon Sep 17 00:00:00 2001 From: David Faure <faure@kde.org> Date: Mon, 29 Jun 2020 00:43:21 +0200 Subject: [PATCH] OpenUrlJob: fix support for shell scripts with a space in the filename When executing a shell script or an executable in dolphin in a folder with a blank e.g. "/my test/test.sh" the path was truncated to "/my" and the command was not executed. Document the API trap. BUG: 423412 BUG: 423645 FIXED-IN: 5.72 (cherry picked from commit 8d6b306f585920230acecd19903325f6f0387b8e) --- src/gui/commandlauncherjob.h | 2 ++ src/gui/openurljob.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/commandlauncherjob.h b/src/gui/commandlauncherjob.h index 48058a25..58728405 100644 --- a/src/gui/commandlauncherjob.h +++ b/src/gui/commandlauncherjob.h @@ -57,6 +57,8 @@ public: /** * Creates a CommandLauncherJob. * @param command the shell command to run + * The command is given "as is" to the shell, it must already be quoted if necessary. + * If @p command is instead a filename, consider using the other constructor, even if no args are present. * @param parent the parent QObject * * Please consider also calling setDesktopName(), or setExecutable() and setIcon() diff --git a/src/gui/openurljob.cpp b/src/gui/openurljob.cpp index 93818d15..207190fa 100644 --- a/src/gui/openurljob.cpp +++ b/src/gui/openurljob.cpp @@ -532,7 +532,7 @@ bool KIO::OpenUrlJobPrivate::handleExecutables(const QMimeType &mimeType) void KIO::OpenUrlJobPrivate::executeCommand() { // Execute the URL as a command. This is how we start scripts and executables - KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(m_url.toLocalFile()); + KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(m_url.toLocalFile(), QStringList()); job->setUiDelegate(q->uiDelegate()); job->setStartupId(m_startupId); job->setWorkingDirectory(m_url.adjusted(QUrl::RemoveFilename).toLocalFile()); -- 2.25.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor