Re: The status of MIME support?

Christophe Fergeau wrote:
Are you sure it's really using gnome-vfs-mime-magic. Maybe the problem
is that when gnome-vfs guesses a mime type by looking at a filename,
it's properly using your user customization, but when it's sniffing a
file, it fails to look at user modifications to the db, and falls back
to the db in /usr/share/mime ?

Hm... it seems I was wrong. gnome-vfs *does* use FD.o MIME sniffing.
However, my problem is still not solved. I have two entries in $XDG_DATA_DIRS: /opt/gnome2/share:/home/hongli/.local/share

I put test.xml in ~/.local/share/mime/packages and ran update-mime-database. gnome-vfs looks in /opt/gnome2/share/mime/magic first and sees that image/png matches the file, and stops there, even though ~/.local/share/mime/packages/test.xml has a higher matching priority. If I put test.xml in /opt/gnome2/share/mime/packages, then it works. Unfortunately I can't make my app to do that because it requires root permissions.

I think gnome-vfs should look in *all* dirs in XDG_DATA_DIRS and see which magic entry contains the highest priority.

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