D22510: Added dialog to set execute permission for executable file when trying to run it.

David Faure noreply at phabricator.kde.org
Mon Sep 2 21:03:56 BST 2019


dfaure added inline comments.

INLINE COMMENTS

> dfaure wrote in krun.cpp:147
> I wonder why this doesn't use isExecutable(mimetype)...

Hmm, because isExecutable(mimetype) also returns true for desktop files.

So this would change behaviour for users of this API. (see why we try to limit public API...).

Most users found in https://lxr.kde.org/ident?_i=isExecutableFile would actually see this as a bugfix (they warn about, or forbid, local execution), but
https://lxr.kde.org/source/extragear/utils/krusader/krusader/Panel/panelfunc.cpp
would try to run the desktop file with runCommand which uses KProcess, this will fail.

So... I was just wondering (and hinting at an investigation, not requesting a change), but I have my answer now..

I suggest to revert your last change, and maybe add a comment about why we can't use isExecutable. (Or we could extract a common function...)

REPOSITORY
  R241 KIO

BRANCH
  arcpatch-D22510

REVISION DETAIL
  https://phabricator.kde.org/D22510

To: mdlubakowski, #frameworks, dfaure, cfeck, pino
Cc: broulik, ngraham, probono, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190902/a0cbbd98/attachment.html>


More information about the Kde-frameworks-devel mailing list