diff options
author | Ben Burwell <ben@benburwell.com> | 2019-07-31 14:21:13 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-02 09:34:10 -0400 |
commit | c9a909fee3d79917589f46ebd7c7453afb33bf1c (patch) | |
tree | 655ea99313fd4302b28e79ceca387c1c275b340c /widgets/compose.go | |
parent | bb620e09004e63699562c0533645bf8cfd865097 (diff) | |
download | aerc-c9a909fee3d79917589f46ebd7c7453afb33bf1c.tar.gz |
Fix sending attachments with less than 512 bytes
Diffstat (limited to 'widgets/compose.go')
-rw-r--r-- | widgets/compose.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index 03b65860..a0a5259c 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -409,7 +409,7 @@ func writeAttachment(path string, writer *mail.Writer) error { // determine the MIME type // http.DetectContentType only cares about the first 512 bytes head, err := reader.Peek(512) - if err != nil { + if err != nil && err != io.EOF { return errors.Wrap(err, "Peek") } |