https://bugs.kde.org/show_bug.cgi?id=421374

Jonathan Marten <j...@keelhaul.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Version Fixed In|                            |5.71
      Latest Commit|                            |https://commits.kde.org/kio
                   |                            |/6452a34cf01d03d3167b38bc28
                   |                            |a2fe8e13569021

--- Comment #14 from Jonathan Marten <j...@keelhaul.me.uk> ---
Git commit 6452a34cf01d03d3167b38bc28a2fe8e13569021 by Jonathan Marten.
Committed on 14/05/2020 at 18:17.
Pushed by marten into branch 'master'.

Fix service file specifying 'Run in terminal' giving an error code 100

Happens because KIO::DesktopExecParser::resultingArguments() prepends
the terminal application to the command line.  If this is a relative path,
as it is most likely to be (and will be in the default 'konsole' case),
the "realExecutable" check in KProcessRunner::KProcessRunner() is triggered
and the job aborts with an error.

Expand the specified terminal executable into a full path in
resultingArguments(),
and return an error immediately if it cannot be found.  This full terminal path
is not relative for the KProcessRunner::KProcessRunner() check and does not
fail.

Check that resultingArguments() is not empty (an error return) before accessing
the first word of the command, so that it does not assert if the list is empty.
Also only call resultingArguments() once.
FIXED-IN: 5.71

Differential Revision: https://phabricator.kde.org/D29738

M  +9    -1    src/core/desktopexecparser.cpp
M  +9    -8    src/gui/kprocessrunner.cpp

https://commits.kde.org/kio/6452a34cf01d03d3167b38bc28a2fe8e13569021

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to