summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-01-22 01:17:37 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-09 11:41:20 +0400
commitb3379557aff4f04f98ef075a575d9dac6c1d1431 (patch)
tree257447ac6bd4a6462a4f3c6b6f07e63a481df721
parent9f2660fbaefff146cbd5b4bfc885b7e3f47e1626 (diff)
downloadglib-b3379557aff4f04f98ef075a575d9dac6c1d1431.tar.gz
gio: return '*' content type on win32 from unknown mime
This fixes test_unknown. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--gio/gcontenttype-win32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gio/gcontenttype-win32.c b/gio/gcontenttype-win32.c
index 726759d8c..2f3b0da7e 100644
--- a/gio/gcontenttype-win32.c
+++ b/gio/gcontenttype-win32.c
@@ -342,7 +342,8 @@ g_content_type_from_mime_type (const gchar *mime_type)
content_type = get_registry_classes_key (key, L"Extension");
g_free (key);
- return content_type;
+
+ return content_type ? g_steal_pointer (&content_type) : g_strdup ("*");
}
gchar *