Unalias. Patch by Markus Bergman
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 30 Jun 2008 04:59:40 +0000 (04:59 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 30 Jun 2008 04:59:40 +0000 (04:59 +0000)
        * gcontentype.c (g_content_type_from_mime_type): Unalias.
        Patch by Markus Bergman

svn path=/trunk/; revision=7109

gio/ChangeLog
gio/gcontenttype.c

index 7c2b4717cad5ffbbe190c63015930dcabe87ba0e..064f4a40dd18246fb64e196fc7cd44c2a5cc8388 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-30  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 539090 – g_content_type_from_mime_type() should unalias
+
+       * gcontentype.c (g_content_type_from_mime_type): Unalias.
+       Patch by Markus Bergman
+
 2008-06-30  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 538836 – make check failure on PPC and ALPHA: pltcheck.sh on
index a943e84d9439f89f13724cdfb764256c41003edd..ee71c42966ea680f8328b27002fb22e52f4e9e08 100644 (file)
@@ -832,10 +832,16 @@ looks_like_text (const guchar *data, gsize data_size)
 char *
 g_content_type_from_mime_type (const char *mime_type)
 {
+  char *umime;
+
   g_return_val_if_fail (mime_type != NULL, NULL);
 
+  G_LOCK (gio_xdgmime);
   /* mime type and content type are same on unixes */
-  return g_strdup (mime_type);
+  umime = g_strdup (xdg_mime_unalias_mime_type (mime_type));
+  G_LOCK (gio_xdgmime);
+
+  return umime;
 }
 
 /**