From 1462d083bf7efd5e8919b3fe23c71f9cb7e792a9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 15 May 2021 15:30:32 +0200 Subject: db/message: apply _fixup_charset() to attachments as well --- alot/db/message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alot/db/message.py b/alot/db/message.py index f22db54b..62169356 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -134,6 +134,9 @@ class _MimeTree: children.append(_MimeTree(part, session_keys)) self.children = children else: + if self.content_maintype == 'text': + self._fixup_charset() + cd = part.get_content_disposition() fn = part.get_filename() if cd == 'attachment' or fn is not None: @@ -141,9 +144,6 @@ class _MimeTree: self.attachment = Attachment(data, self.content_type, fn, part.get_params()) - if self.content_maintype == 'text': - self._fixup_charset() - def __str__(self): return 'MimePart(%s)' % self.content_type -- cgit v1.2.3