On 9/18/07, Alexander Larsson <[EMAIL PROTECTED]> wrote: > On Tue, 2007-09-18 at 00:51 +0200, David Faure wrote: > > On Tuesday 28 August 2007, Alexander Larsson wrote: > > > If several globs matches, and sniffing fails, or doesn't help: > > > fall back to the first glob match > > > (maybe we should do something better here?) > > > > Hmm, I just found the case of "README.txt", which could either be > > "text/plain" due to *.txt > > or "text/x-readme" due to README*. Which one should we pick? The second > > pattern "looks" > > more specific to my eyes so it should probably win, but how should we > > quantify that? > > Should we take the longest pattern? > > Yeah, this is tricky. I think the longest pattern is the traditional way > to solve things like that. It will probably work good enought for us.
Isn't just enough to check if either of them is the subclass of the second? If so, pick the more specific one. -- Patryk Zawadzki Generated Content _______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
