summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-07-19 14:51:31 +0800
committerLuke from DC <[email protected]>2023-07-24 02:51:58 +0000
commit45f52c13baa93857d912effb4f1f9a58c41a0da3 (patch)
tree5f9586a156b92d8d089ee16406ebe79cfb1e41bb
parent79c9b8ee20cdf11c69dde173c5f04d51d5f8c778 (diff)
downloadengrampa-45f52c13baa93857d912effb4f1f9a58c41a0da3.tar.bz2
engrampa-45f52c13baa93857d912effb4f1f9a58c41a0da3.tar.xz
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
-rw-r--r--src/fr-archive.c10
1 files changed, 0 insertions, 10 deletions
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;