Summary: | KIO regression in how it handles scripts (shell, python, javascript ...etc) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Kai Uwe Broulik <kde> |
Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.samirh78, benjamin.port, cfeck, kde, kdelibs-bugs, kishore96, nate, sephiroth_pk, ttttolki |
Priority: | NOR | Keywords: | regression |
Version: | 5.73.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=425431 https://bugs.kde.org/show_bug.cgi?id=425177 |
||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/fdd7c47c85d5d6dbf21e05e7a0d6afcf383f1d24 | Version Fixed In: | 5.75 |
Sentry Crash Report: |
Description
Kai Uwe Broulik
2020-08-26 12:16:11 UTC
All of them or only some? Are they marked as executable? Can confirm for non-executable files on my own system. This should only happen if the file is actually executable so there *is* an option to execute it. Confirmed for .py (Python) files. Previously, I could select between "Execute" or "Open" (in editor), and the choice was respected. Now, "Execute" opens it in the editor, while "Open" does nothing at first, but seems to queue them. A final "Execute" choice will open all queued editor windows. Apparently, application/javascript inherits application/x-executable which has it prompt for executing it. isExecutableMime in OpenUrlJob returns true for JS files and potentially others Apparently, application/javascript inherits application/x-executable which has it prompt for executing it. isExecutableMime in OpenUrlJob returns true for JS files and potentially others KRun also checked the executable bit before, maybe that's the trick? *** Bug 425431 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/137 *** Bug 425177 has been marked as a duplicate of this bug. *** Git commit fdd7c47c85d5d6dbf21e05e7a0d6afcf383f1d24 by Ahmad Samir. Committed on 21/09/2020 at 12:26. Pushed by dfaure into branch 'master'. OpenUrlJob: handle all text scripts consistently Previously we only handled application/x-shellscript, but there are other scripts; a script is technically a file that inherits both text/plain and application/x-executable, e.g. .sh, .csh, .py, perl scripts ...etc. Treat all those mime types the way we handled shell scripts: - if it's not a local url, or isn't executable we open it in the preferred text editor - if it's executable either show the OpenOrExecute dialog or execute directly depending on how the job is configured The mimetype world is a confusing one: - Executables, this includes .exe files (MS Windows); and "application/x-executable" and "application/x-sharedlib", this depends on various parameters (e.g. stripped executables are x-sharedlib, the same executable if not stripped is x-executable...) - Scripts: shell, python, perl... etc scripts, which are text files that can be executed or opened as text. Adjust the unit test. Related: bug 425177 FIXED-IN: 5.75 M +43 -13 autotests/openurljobtest.cpp M +2 -0 autotests/openurljobtest.h M +40 -25 src/gui/openurljob.cpp https://invent.kde.org/frameworks/kio/commit/fdd7c47c85d5d6dbf21e05e7a0d6afcf383f1d24 *** Bug 427362 has been marked as a duplicate of this bug. *** |