[glib: 2/11] gio: return '*' content type on win32 from unknown mime




commit b3379557aff4f04f98ef075a575d9dac6c1d1431
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Sat Jan 22 01:17:37 2022 +0400

    gio: return '*' content type on win32 from unknown mime
    
    This fixes test_unknown.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 gio/gcontenttype-win32.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
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 *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]