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; + } + } } }