Since D22510, executables are no longer checked by isExecutableFile, which excluded application/x-ms-dos-executable files on non-Windows platforms inside KRun::runUrl, which results in broken interaction.
This patch restores previous behaviour.
Details
Diff Detail
- Repository
- R241 KIO
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Thanks for the quick fix.
src/widgets/krun.cpp | ||
---|---|---|
366 | const bool ... | |
370 | const bool ... Also, the name of this bool is very confusing in my opinion. Maybe name it something like supportsRunningExecutable? | |
395 | Can you split this into two "else if" conditions? It will be more readable (both the condition, and the comment). This only duplicates a trivial "canRun = false" statement. And then we could further simplify this by checking the new bool first, so it only needs to be checked once... if (!supportsRunningExecutable) { canRun = false; } else if (!isFileExecutable && !isTextFile) { [....] } else if (!isFileExecutable && isTextFile) { canRun = false; } What do you think? |
src/widgets/krun.cpp | ||
---|---|---|
395 | Agree, it looks cleaner like that. |
I wonder if this should maybe be backported to 5.62, since it represents a regression introduced in that release. Thoughts?
I would say yes, since I imagine this may be annoyance to some people (the patch basically traded one functionality for another, my fault though). Also not many distros have updated yet (well, Tumbleweed hasn't).
Thanks for landing!