xdg-mime query filetype|default

Stefan.Kost at nokia.com Stefan.Kost at nokia.com
Fri Jun 29 02:19:22 PDT 2007


Hi,

>-----Original Message-----
>From: ext Christian Neumair [mailto:cneumair at gnome.org] 
>Sent: 26 June, 2007 14:19
>To: Kost Stefan (Nokia-M/Helsinki)
>Cc: xdg at lists.freedesktop.org
>Subject: Re: xdg-mime query filetype|default
>
>Am Dienstag, den 26.06.2007, 09:46 +0300 schrieb Stefan.Kost at nokia.com:
>> hi,
>> 
>> I have two issues I feel a bit lost about regarding the shared-mime 
>> handling.
>> > xdg-mime query filetype song.ogg
>> application/ogg
>> 
>> but according to the matching rules
>> in /usr/share/mime/packages/freedesktop.org.xml it should reply with 
>> audio/x-vorbis+ogg the rule is correct (I checked the file with 
>> hexdump -C) and the priority is higher than the generic 
>> application/ogg.
>
>If you use xdg-mime under GNOME, it uses gnomevfs-info, which 
>just considers the passed-in filename and stat() unless you 
>specify the "-s"
>option. You can modify the "info_gnome()" function in the 
>xdg-mime shell script to pass "-s" to gnomevfs-info, and it 
>will also consider the file contents.
>
Thanks for the tip. Hope that gets fixed in a new version of xdg-mime.
Is nautilus using the simple method too, or is it looking into the
files? Apart I currently kill nautilus to make it see the updates. Is
there some alternative - could it watch the files and re-read the
mime-info.
>
>The current situation is a bit unfortunate, since we should 
>really be using the xdgmime MIME library instead of using 
>third-party tools. Maybe that is an option as soon as xdgmime 
>will be distributed, and we have something interface-stable to 
>link against.
>
>--
>Christian Neumair <cneumair at gnome.org>
>
>
Thanks!

Stefan


More information about the xdg mailing list