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 7c2b471..064f4a4 100644 (file)
@@ -1,5 +1,12 @@
 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
        g_atomic_pointer_get
 
index a943e84..ee71c42 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;
 }
 
 /**