From 059b10443c50ed6192c23f1f9e7c67d368757050 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Sat, 30 Jun 2018 18:08:22 -0500 Subject: [PATCH 3/6] Fix special case for mime_type_subclass This upstreams the fix from https://gitlab.gnome.org/GNOME/glib/commit/eb7b796bd206c31e336c89fb828a8a343ffb34ba https://bugs.freedesktop.org/show_bug.cgi?id=100733 --- src/xdgmime.c | 3 ++- src/xdgmimecache.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xdgmime.c b/src/xdgmime.c index 70c99bc..815ffea 100644 --- a/src/xdgmime.c +++ b/src/xdgmime.c @@ -784,7 +784,8 @@ _xdg_mime_mime_type_subclass (const char *mime, strncmp (umime, "text/", 5) == 0) return 1; - if (strcmp (ubase, "application/octet-stream") == 0) + if (strcmp (ubase, "application/octet-stream") == 0 && + strncmp (umime, "inode/", 6) != 0) return 1; parents = _xdg_mime_parent_list_lookup (parent_list, umime); diff --git a/src/xdgmimecache.c b/src/xdgmimecache.c index 0ecaa4f..40ad46f 100644 --- a/src/xdgmimecache.c +++ b/src/xdgmimecache.c @@ -858,7 +858,8 @@ _xdg_mime_cache_mime_type_subclass (const char *mime, strncmp (umime, "text/", 5) == 0) return 1; - if (strcmp (ubase, "application/octet-stream") == 0) + if (strcmp (ubase, "application/octet-stream") == 0 && + strncmp (umime, "inode/", 6) != 0) return 1; for (i = 0; _caches[i]; i++) -- 2.17.1