mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
[#97] Do not attempt to convert filename top unicode if no filename was available.
This commit is contained in:
parent
b378e6dcb9
commit
d75d838e26
1 changed files with 4 additions and 1 deletions
|
|
@ -260,7 +260,10 @@ class Mailbox(models.Model):
|
|||
) or
|
||||
('attachment' in msg.get('Content-Disposition', ''))
|
||||
):
|
||||
filename = utils.convert_header_to_unicode(msg.get_filename())
|
||||
filename = None
|
||||
raw_filename = msg.get_filename()
|
||||
if raw_filename:
|
||||
filename = utils.convert_header_to_unicode(raw_filename)
|
||||
if not filename:
|
||||
extension = mimetypes.guess_extension(msg.get_content_type())
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue