summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-15 15:30:32 +0200
committerAnton Khirnov <anton@khirnov.net>2021-05-15 15:30:32 +0200
commit1462d083bf7efd5e8919b3fe23c71f9cb7e792a9 (patch)
tree42f47f054cca92c8da37a3ec2ac1a8c00a0570a2
parentffbf072f64581f8f7776e2806846cf45c7a64045 (diff)
db/message: apply _fixup_charset() to attachments as well
-rw-r--r--alot/db/message.py6
1 files 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