diff options
author | Toyeesh Sinha <[email protected]> | 2023-06-14 02:47:44 +0530 |
---|---|---|
committer | Luke from DC <[email protected]> | 2023-06-14 03:36:53 +0000 |
commit | 8e33e604d87e90bda3cc748bc1627c164d72a16c (patch) | |
tree | c991937febb1a1bfeeeae764fc8c1fa4fdac694c | |
parent | 5602738e3eb15652a7e979a9c85fc6478401761c (diff) | |
download | engrampa-8e33e604d87e90bda3cc748bc1627c164d72a16c.tar.bz2 engrampa-8e33e604d87e90bda3cc748bc1627c164d72a16c.tar.xz |
Update to change the fallback and fix gzip issue
-rw-r--r-- | src/file-utils.c | 2 | ||||
-rw-r--r-- | src/fr-archive.c | 4 | ||||
-rw-r--r-- | src/fr-init.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/file-utils.c b/src/file-utils.c index 4983a7b..6d4f328 100644 --- a/src/file-utils.c +++ b/src/file-utils.c @@ -555,7 +555,7 @@ gboolean is_mime_type (const char *mime_type, const char *pattern) { - return (strcasecmp (mime_type, pattern) == 0); + return g_content_type_equals (mime_type, pattern); } const char* diff --git a/src/fr-archive.c b/src/fr-archive.c index b42b4a4..f4ccefe 100644 --- a/src/fr-archive.c +++ b/src/fr-archive.c @@ -1103,9 +1103,9 @@ load_local_archive (FrArchive *archive, old_command = archive->command; #if ENABLE_MAGIC - mime_type = get_mime_type_from_magic_numbers (archive->local_copy); -#else mime_type = get_mime_type_from_filename (archive->local_copy); +#else + mime_type = get_mime_type_from_magic_numbers (archive->local_copy); #endif if (! create_command_to_load_archive (archive, mime_type)) { diff --git a/src/fr-init.c b/src/fr-init.c index c018bfa..c7a876d 100644 --- a/src/fr-init.c +++ b/src/fr-init.c @@ -292,7 +292,7 @@ fr_registered_command_get_capabilities (FrRegisteredCommand *reg_com, FrMimeTypeCap *cap; cap = g_ptr_array_index (reg_com->caps, i); - if (strcmp (mime_type, cap->mime_type) == 0) + if (is_mime_type (mime_type, cap->mime_type)) return cap->current_capabilities; } @@ -312,7 +312,7 @@ fr_registered_command_get_potential_capabilities (FrRegisteredCommand *reg_com, FrMimeTypeCap *cap; cap = g_ptr_array_index (reg_com->caps, i); - if ((cap->mime_type != NULL) && (strcmp (mime_type, cap->mime_type) == 0)) + if ((cap->mime_type != NULL) && (is_mime_type (mime_type, cap->mime_type))) return cap->potential_capabilities; } @@ -508,7 +508,7 @@ get_mime_type_index (const char *mime_type) int i; for (i = 0; mime_type_desc[i].mime_type != NULL; i++) - if (strcmp (mime_type_desc[i].mime_type, mime_type) == 0) + if (is_mime_type (mime_type_desc[i].mime_type, mime_type)) return i; return -1; } |