Re: new mime detection approach

Alexander Larsson <alexl redhat com> writes:

> It does introduce a strange behaviour though. Clicking on a file (or
> otherwise selecting it) can change the type (and icon) of it.

I don't like this idea, since it basically means the sniffers tries to
be more clever than the application, which past has shown isn't the
case (ie I have a correct gimp file that gimp will happily open, now
comes the sniffer and says its an mpeg -> bummer for no good reason).

What I would like is to get the sniffer only into action when the
application associated with the file extension itself wasn't able to
open it (check return code, but might not work with all apps) or if no
associated application could be found (ie no file extension).

It should also be possbible to invokate the sniffer manually, like one
does on the shell with 'file', since that way the experienced user can
invoke it if needed and doesn't get tricked by it for no reason.

> However, I think that, given some work, we can make the mime
> sniffing pretty damn good.

It already fails today for some Gimp files, so I have pretty much zero
hope that it won't lead to missdetection with much less common files
or new file types yet to come.

> In the end I trust magic more than extensions, since we control the
> magic and can fix any issues, while we can never control or fix the
> users filenames.

Which means putting control into deveolpers hands and given the user
no controll at all, which is a very bad idea. The user should be the
one in controll, always, the computer should only be there to help him
and not getting in the users way on every second click. If the sniffer
can help with incorrect extensions, then thats good, if the sniffer
makes some files 'broken' and unfixable due to misssniffing without a
way to override, thats very very bad. 

All I want is way to switch off the sniffer complete, after all I know
what a file extension is and many many users will know that too, the
sniffer can't do any good for them, unless involked manually of
course. And in addition it would be nice to make the sniffer more
transparent, ie. have a list of available sniffers, see what they can
sniff and switch them of one by one if some of them to more bad than

Anyway, in the long run I think storing the mime-type in an EA is the
way to go, since that would be the only way to get rid of the
file-extension dependency requirement while still not relying on some
more or less broken heuristic. 

JabberID: grumbel jabber org 
ICQ:      59461927

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]