mimetype guessing is fooled by extension
Allan Sandfeld Jensen
kde at carewolf.com
Tue Aug 10 11:55:25 BST 2004
On Tuesday 10 August 2004 12:24, David Faure wrote:
> On Sunday 25 July 2004 13:39, Allan Sandfeld Jensen wrote:
> > X-KDE-PatternAccuracy as suggested above, but C and C++ is detected as
> > "text/x-c++" and "text/x-c" which does not exists as mimetypes in KDE
> > (has "text/x-csrc" and "text/x-chdr")
>
> Sounds like KMimeMagic should be fixed to use the mimetypes that KDE knows
> about (no need for new mimetypes for that). Can you check that?
I turns out I was wrong. KMimeMagic checks for the extension ".h" and adds
"hdr" or "src" based on it (doesnt check for no-extension or other
cpp-header-extensions though).
I also decided against reducing X-KDE-PatternAccuracy for .h files, because
the current magic is really weak. Basically it only check 1024 bytes, which
usually is entirely the GPL header, and no actual code.
`Allan
More information about the kfm-devel
mailing list