GNOME Bugzilla – Bug 586327
gfile mime_type detection is broken
Last modified: 2009-06-19 00:45:22 UTC
In get_file_mime_type: result = gfile_get_mime_type (file, fast_file_type); ... if (result == NULL) { char *value; value = g_content_type_guess (path, NULL, 0, NULL); result = get_static_string (value); g_free (value); } g_content_type_guess does not return a mime_type - you need g_content_type_get_mime_type for that. Plus, this should be in gfile_get_mime_type, not the get_file_mime_type wrapper. Extra wrinkle - some functions return const char*, some return char*. - Mike
Whoops, never mind - I was reading the source code of the Windows version of g_content_type_guess, not th linux version. - Mike