diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-09-01 16:08:47 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-09-01 16:08:47 +0100 |
commit | 4420c123e1d0c564b81cd455bbcc52d87597800b (patch) | |
tree | 20760a2d267af6e0f5bd9990144ae793eb30d40f /alot | |
parent | 7777201c6c0308c07d7d3bade24eb4094f36650b (diff) |
fix buf with non-basename filenames in attachments
Apparently, some clients (k9 on android) send attachments
with a full pathname as filename. in that case we only use
its basename.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/message.py b/alot/message.py index f3128eba..85673858 100644 --- a/alot/message.py +++ b/alot/message.py @@ -296,7 +296,7 @@ class Attachment: def get_filename(self): """return the filename, extracted from content-disposition header""" - return self.part.get_filename() + return os.path.basename(self.part.get_filename()) def get_content_type(self): """mime type of the attachment""" |