Re: Mime type detection in beagle [Was: IndexHelper eating cpu]



> > shared-mime-info.xml (FreeDesktop.Org spec) has the following to say "...
> > There are several reasons for checking most of the glob patterns before
> > the magic. Some applications don't check the magic at all, and this makes
> > it more likely that both will get the same type. Users can easily
> > understand why calling their text file <filename>README.mp3</filename>
> > makes the system think it's an MP3, whereas they have trouble
> > understanding why their computer thinks <filename>README.txt</filename>
> > is a PostScript file. If the system guesses wrongly, the user can often
> > rename the file to fix the problem...."
>
> Please don't expect that I agree to this: "glob patterns" before "magic" ?
> Obviously they check only "glob pattern". Only if the glob pattern doesn't
> exist they check for the "magic", probably.
>
> However, as a user I do expect that the mime type is just detected
> correctly. Independent of file names and extensions or even missing
> extensions. The latter is not unlikely on Unix/Linux systems.
>
> During the last weeks we both have discussed exceptions in jpeg files which
> finally turned out to be just png files, whatever. IIRC, in the last weeks
> you added checks to image filters to make sure that you really parse a
> jpeg, gif, png, etc. - a task which doesn't belong to the beagle filters at
> all but obviously triggered by poor mime type detection.

There is some logic to your argument. I filed a bug 
http://bugzilla.gnome.org/show_bug.cgi?id=406461 with my comments and a 
patch. The patch is wrt xdgmime so I want at least one more pair of eyes to 
review it.

- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user



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