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

--- Comment #2 from David Faure <fa...@kde.org> ---
Git commit 05cbbf06384bae0cad8de19d659864c0f8dbd651 by David Faure.
Committed on 27/04/2020 at 21:22.
Pushed by dfaure into branch 'master'.

Detect executables without +x permission in $PATH to improve error message

Summary:
QStandardPaths::findExecutable will not return to us a non-executable binary.
So implement our own iteration over $PATH to detect such a case.
Note: this doesn't handle the case where PATH isn't set at all (QStandardPaths
implements a fallback)
nor do we implement this for Windows (where chmod -x doesn't really exist as
is). I think this is fine,
in the worst case the user will get the other error message, program not found.

Test Plan:
'sudo chmod a-x /usr/bin/gwenview' then try opening a picture with gwenview
from e.g. dolphin, see the error message

Reviewers: ahmadsamir

Reviewed By: ahmadsamir

Subscribers: ngraham, meven, kde-frameworks-devel

Tags: #frameworks

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

M  +16   -5    autotests/applicationlauncherjobtest.cpp
M  +11   -8    src/core/desktopexecparser.cpp
M  +42   -2    src/gui/kprocessrunner.cpp

https://commits.kde.org/kio/05cbbf06384bae0cad8de19d659864c0f8dbd651

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

Reply via email to