dfaure created this revision. dfaure added a reviewer: ahmadsamir. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. dfaure requested review of this revision.
REVISION 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 REPOSITORY R241 KIO BRANCH 2020_04_findExecutable REVISION DETAIL https://phabricator.kde.org/D29170 AFFECTED FILES src/gui/kprocessrunner.cpp To: dfaure, ahmadsamir Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns