diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-09 13:45:15 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-09 13:45:15 +0100 |
commit | 61ffc105fd8480b0af4151e3fadb0751d38bea82 (patch) | |
tree | 352011041a9c9e6a4db3b8ed8a072e5c117bc7b3 /imap.go | |
parent | d1d43809577f85d2feec4bc61601ca9ade378b5b (diff) | |
download | alps-61ffc105fd8480b0af4151e3fadb0751d38bea82.tar.gz alps-61ffc105fd8480b0af4151e3fadb0751d38bea82.zip |
Use imap.BodyStructure.Filename and imap.Address.Address
The former fixes encoding issues in filenames. The latter is just for
brevity.
Diffstat (limited to 'imap.go')
-rw-r--r-- | imap.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -174,10 +174,7 @@ func imapPartTree(bs *imap.BodyStructure, path []int) *IMAPPartNode { path = []int{1} } - var filename string - if strings.EqualFold(bs.Disposition, "attachment") { - filename = bs.DispositionParams["filename"] - } + filename, _ := bs.Filename() node := &IMAPPartNode{ Path: path, |