[Fwd: Re: Mime types for gnome_vfs_mime_type_from_name?]

Alan Bateman Alan.Bateman at Sun.COM
Mon May 26 03:09:54 PDT 2008

-------- Original Message --------
Subject: 	Re: Mime types for gnome_vfs_mime_type_from_name?
Date: 	Mon, 26 May 2008 11:00:04 +0100
From: 	Darren Kenny <Darren.Kenny at Sun.COM>
To: 	Alan Bateman <Alan.Bateman at Sun.COM>
CC: 	Darren Kenny <Darren.Kenny at Sun.COM>
References: 	<48358DDA.2060609 at sun.com>

Hi Alan,


I think that what's likely to be wrong here is that the pattern for the
x-mozilla-bookmarks is too general, it should be something more specific than
it's parent type text/html. (e.g. bookmarks*.html ?)

Looks like there is already a bug for this at:


No sign of it being fixed yet though, so I just added a quick comment to see if
there's any update.

It would seem that the bug is being "deferred" until typing in KDE and GNOME
supports looking at the 'magic' in the files - but I'm not sure when that might

BTW - as a heads up - you need to be aware that gnome_vfs is on the way out, and
could happen in the next year or so on Linux, might stay longer on Solaris due
to support needs.

It's being replaced with another implementation that is located in glib (much
lower down the library stack) rather than the gnome layer. It's now broken in to
two elements, GLIB and GIO. For the part you're looking at, it's GIO, and
probably need the function g_content_type_guess() [1]. It's possible that this
implementation may (given the function signature) look at the file contents, and
may work for you.



More information about the nio-dev mailing list