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-04-11 16:49:32 +0200 |
commit | 3ba04b2973acc798417d584ca9d1b81d4f55a4fc (patch) | |
tree | 6222cfd22625295e9deb18fa956d34d36d1a48df /tdeio | |
parent | 83badc2107776a2a0d4afc59bf179d6f57dcf3f8 (diff) | |
download | tdelibs-3ba04b2973acc798417d584ca9d1b81d4f55a4fc.tar.gz tdelibs-3ba04b2973acc798417d584ca9d1b81d4f55a4fc.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)
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/tdeio/krun.cpp | 5 | ||||
-rw-r--r-- | tdeio/tdeio/tdefileitem.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp index 329199da9..402b339b0 100644 --- a/tdeio/tdeio/krun.cpp +++ b/tdeio/tdeio/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/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index 7af8aae39..577a8a0d7 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -700,7 +700,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const if (p.isNull()) kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl; - if ( mime->name() == "application/x-executable" ) { + if ( mime->name() == "application/x-executable" || mime->name() == "application/x-pie-executable" ) { // At first glance it might seem to be a good idea to // look for .desktop files for this executable before resorting to the embedded icon // in the same fashion as the minicli, but on close examination this is NOT A GOOD IDEA. |