diff options
Diffstat (limited to 'alot/db/attachment.py')
-rw-r--r-- | alot/db/attachment.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/alot/db/attachment.py b/alot/db/attachment.py index 2083dedd..2f8b37dc 100644 --- a/alot/db/attachment.py +++ b/alot/db/attachment.py @@ -4,6 +4,8 @@ import os import tempfile import email.charset as charset +from email.header import Header +from copy import deepcopy charset.add_charset('utf-8', charset.QP, charset.QP, 'utf-8') import alot.helper as helper from alot.helper import string_decode @@ -81,4 +83,9 @@ class Attachment(object): def get_mime_representation(self): """returns mime part that constitutes this attachment""" - return self.part + part = deepcopy(self.part) + cd = self.part['Content-Disposition'] + del part['Content-Disposition'] + part['Content-Disposition'] = Header(cd, maxlinelen=78, + header_name='Content-Disposition') + return part |