From 45f52c13baa93857d912effb4f1f9a58c41a0da3 Mon Sep 17 00:00:00 2001 From: zhuyaliang <15132211195@163.com> Date: Wed, 19 Jul 2023 14:51:31 +0800 Subject: priority useing get_mime_type_from_filename to obtain mime type MAGIC returned incorrect mime type while processing tar compression type Fix https://github.com/mate-desktop/engrampa/issues/492 --- src/fr-archive.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src') diff --git a/src/fr-archive.c b/src/fr-archive.c index 18c700c..183a5ac 100644 --- a/src/fr-archive.c +++ b/src/fr-archive.c @@ -1102,22 +1102,12 @@ load_local_archive (FrArchive *archive, old_command = archive->command; - /* With libmagic, give priority to magic match, and fall back on filename - * match. Do it the other way around if we don't have libmagic. */ -#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); -#endif if (! create_command_to_load_archive (archive, mime_type)) { mime_type = get_mime_type_from_content (archive->local_copy); if (! create_command_to_load_archive (archive, mime_type)) { -#if ENABLE_MAGIC - 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)) { archive->command = old_command; archive->content_type = mime_type; -- cgit v1.2.1