From 9b89825af0dcd78d6ddbde921e94509c5554a07a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 30 Jun 2008 04:59:40 +0000 Subject: [PATCH] Unalias. Patch by Markus Bergman * gcontentype.c (g_content_type_from_mime_type): Unalias. Patch by Markus Bergman svn path=/trunk/; revision=7109 --- gio/ChangeLog | 7 +++++++ gio/gcontenttype.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 7c2b4717c..064f4a40d 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,10 @@ +2008-06-30 Matthias Clasen + + 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 Bug 538836 – make check failure on PPC and ALPHA: pltcheck.sh on diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c index a943e84d9..ee71c4296 100644 --- a/gio/gcontenttype.c +++ b/gio/gcontenttype.c @@ -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; } /** -- 2.34.1