diff options
-rw-r--r-- | mimetypes/application/octet-stream.desktop | 1 | ||||
-rw-r--r-- | tdeio/tdeio/kmimetype.cpp | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mimetypes/application/octet-stream.desktop b/mimetypes/application/octet-stream.desktop index 3b2859890..72a60bc3b 100644 --- a/mimetypes/application/octet-stream.desktop +++ b/mimetypes/application/octet-stream.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Type=MimeType MimeType=application/octet-stream +X-TDE-PatternsAccuracy=0 Comment=Unknown Comment[af]=Onbekende Comment[ar]=غير معروف diff --git a/tdeio/tdeio/kmimetype.cpp b/tdeio/tdeio/kmimetype.cpp index d1bd940eb..197670916 100644 --- a/tdeio/tdeio/kmimetype.cpp +++ b/tdeio/tdeio/kmimetype.cpp @@ -221,8 +221,12 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, KMimeMagicResult* result = KMimeMagic::self()->findFileType( path ); - if ( result && result->isValid() && result->accuracy() > 0 ) - return mimeType( result->mimeType() ); + if ( result && result->isValid() && result->accuracy() > 0 ) { + KMimeType::Ptr resultMime = mimeType( result->mimeType() ); + if (resultMime->patternsAccuracy() > 0) { + return resultMime; + } + } } } |