diff options
Diffstat (limited to 'src')
-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; } |