Skip to content
Commit 05cbbf06 authored by David Faure's avatar David Faure
Browse files

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

CCBUG: 415567

Reviewers: ahmadsamir

Reviewed By: ahmadsamir

Subscribers: ngraham, meven, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D29170
parent 54a6aa4c
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