diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-04-11 14:59:49 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-06-07 14:48:45 +0200 |
commit | c1883367c372fd293d4a17c7aae6063dd2e81da1 (patch) | |
tree | 4ce376179c192598318f10806b3d50775c5d3666 | |
parent | 92bb9740fa5790b88d470371001d4cfdc6026b94 (diff) | |
download | tdelibs-c1883367c372fd293d4a17c7aae6063dd2e81da1.tar.gz tdelibs-c1883367c372fd293d4a17c7aae6063dd2e81da1.zip |
Add a definition of MIME type application/x-pie-executable.
This resolves incorrect identification of binary executables with libmagick >= 5.33.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit a5def4f9a471a83465be8918a443fe96e49e3029)
-rw-r--r-- | kded/kbuildservicetypefactory.cpp | 2 | ||||
-rw-r--r-- | kio/kio/krun.cpp | 5 | ||||
-rw-r--r-- | mimetypes/application/CMakeLists.txt | 3 | ||||
-rw-r--r-- | mimetypes/application/Makefile.am | 3 | ||||
-rw-r--r-- | mimetypes/application/x-pie-executable.desktop | 6 |
5 files changed, 15 insertions, 4 deletions
diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index 27b55176d..a24710740 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -106,7 +106,7 @@ KBuildServiceTypeFactory::createEntry(const TQString &file, const char *resource || (mime == "media/builtin-trash") || (mime == "media/builtin-webbrowser") ) e = new KDEDesktopMimeType( &desktopFile ); - else if ( mime == "application/x-executable" || mime == "application/x-shellscript" ) + else if ( mime == "application/x-executable" || mime == "application/x-pie-executable" || mime == "application/x-shellscript" ) e = new KExecMimeType( &desktopFile ); else if ( !mime.isEmpty() ) e = new KMimeType( &desktopFile ); diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp index 58926eac8..298cc93eb 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -155,8 +155,10 @@ pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, TQWidget* window, noAuth = true; } } - else if (_mimetype == "application/x-executable") + else if (_mimetype == "application/x-executable" || _mimetype == "application/x-pie-executable") + { noRun = true; + } } else if ( isExecutable(_mimetype) ) { @@ -1452,6 +1454,7 @@ bool KRun::isExecutable( const TQString& serviceType ) serviceType == "media/builtin-trash" || serviceType == "media/builtin-webbrowser" || serviceType == "application/x-executable" || + serviceType == "application/x-pie-executable" || serviceType == "application/x-msdos-program" || serviceType == "application/x-shellscript" ); } diff --git a/mimetypes/application/CMakeLists.txt b/mimetypes/application/CMakeLists.txt index 283d8cdf8..2923e52f6 100644 --- a/mimetypes/application/CMakeLists.txt +++ b/mimetypes/application/CMakeLists.txt @@ -21,7 +21,8 @@ install( FILES x-jar.desktop x-arj.desktop x-tarz.desktop x-gzpostscript.desktop postscript.desktop octet-stream.desktop x-shellscript.desktop x-desktop.desktop - x-executable.desktop x-executable-script.desktop x-archive.desktop x-lha.desktop + x-executable.desktop x-pie-executable.desktop x-executable-script.desktop + x-archive.desktop x-lha.desktop x-tbz.desktop x-tgz.desktop x-awk.desktop x-perl.desktop x-perl-module.desktop x-compress.desktop x-cpio.desktop x-rpm.desktop msword.desktop x-sharedlib.desktop diff --git a/mimetypes/application/Makefile.am b/mimetypes/application/Makefile.am index c4e2eeb34..8865b1a1d 100644 --- a/mimetypes/application/Makefile.am +++ b/mimetypes/application/Makefile.am @@ -8,7 +8,8 @@ mimetypeapplicationdata_DATA = x-dvi.desktop x-gzdvi.desktop x-bz2dvi.desktop \ x-jar.desktop x-arj.desktop x-tarz.desktop \ x-gzpostscript.desktop postscript.desktop octet-stream.desktop \ x-shellscript.desktop x-desktop.desktop \ - x-executable.desktop x-executable-script.desktop x-archive.desktop x-lha.desktop \ + x-executable.desktop x-pie-executable.desktop x-executable-script.desktop \ + x-archive.desktop x-lha.desktop \ x-tbz.desktop x-tgz.desktop x-awk.desktop \ x-perl.desktop x-perl-module.desktop x-compress.desktop x-cpio.desktop \ x-rpm.desktop msword.desktop x-sharedlib.desktop \ diff --git a/mimetypes/application/x-pie-executable.desktop b/mimetypes/application/x-pie-executable.desktop new file mode 100644 index 000000000..edc09d7f0 --- /dev/null +++ b/mimetypes/application/x-pie-executable.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Comment=Executable File +Icon=application-x-executable +Type=MimeType +MimeType=application/x-pie-executable +X-TDE-IsAlso=application/x-executable |