From aef67de454a00af06be1a72397ffcb930b15abf5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 15 May 2021 18:51:30 +0200 Subject: mail/envelope: drop a workaround for very old libmagic versions 5.12 was released in 2013, we do not need to support it anymore. --- alot/mail/envelope.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/alot/mail/envelope.py b/alot/mail/envelope.py index 4714b32d..a4985c7a 100644 --- a/alot/mail/envelope.py +++ b/alot/mail/envelope.py @@ -9,7 +9,6 @@ import email import email.policy from email.message import MIMEPart import email.charset as charset -import mimetypes from urllib.parse import unquote import gpg @@ -221,15 +220,6 @@ class Envelope: data = f.read() ctype = helper.guess_mimetype(data) - # libmagic < 5.12 incorrectly detects excel/powerpoint files as - # 'application/msword' (see #179 and #186 in libmagic bugtracker) - # This is a workaround, based on file extension, useful as long - # as distributions still ship libmagic 5.11. - if (ctype == 'application/msword' and - not _libmagic_version_at_least(513)): - mimetype, _ = mimetypes.guess_type(path) - if mimetype: - ctype = mimetype # Set the filename parameter if not filename: -- cgit v1.2.3