Is it possible that KMimeType uses for detection of mimetypes just the data from the db which is directly about the type itself and not also checking e.g. the magic data available for the subtypes? Example: call "touch test.xslx" in some directory and browse with Dolphin there, it will be wrongly displayed as "Excel 2007 spreadsheet". Given the following data from the mime db I would have expected that the magic data for the zip type would also need to work for the subclass of it. Is that a wrong expectation? /usr/share/mime/packages/freedesktop.org.xml has: --- 8< --- [...] <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"> <comment>Excel 2007 spreadsheet</comment> [...] <glob pattern="*.xlsx"/> <sub-class-of type="application/zip"/> </mime-type> [...] <mime-type type="application/zip"> <comment>Zip archive</comment> [...] <magic priority="40"> <match value="PK\003\004" type="string" offset="0"/> </magic> <glob pattern="*.zip"/> </mime-type> --- 8< ---
(In reply to comment #0) > call "touch test.xslx" bah, typo: should have been call "touch test.xlsx"
Which exact KDE version are you using? There were several patches in 4.11.1, 4.11.2, and 4.11.3 that changed the behaviour of KDE mime handling (and it _should_ work now with 4.11.3, but if not, further investigations are needed).
Can no longer reproduce with KDE Frameworks 5.43 (or rather QMimeDatabase) ;) So happily closing as resolved.