summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-31 14:21:13 -0400
committerDrew DeVault <sir@cmpwn.com>2019-08-02 09:34:10 -0400
commitc9a909fee3d79917589f46ebd7c7453afb33bf1c (patch)
tree655ea99313fd4302b28e79ceca387c1c275b340c /widgets
parentbb620e09004e63699562c0533645bf8cfd865097 (diff)
downloadaerc-c9a909fee3d79917589f46ebd7c7453afb33bf1c.tar.gz
Fix sending attachments with less than 512 bytes
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 03b6586..a0a5259 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")
 	}
 
tle='author James Booth <boothj5@gmail.com> 2013-12-27 17:25:30 +0000 committer James Booth <boothj5@gmail.com> 2013-12-27 17:25:30 +0000 Added /sub command test' href='/danisanti/profani-tty/commit/tests/test_cmd_sub.c?id=976f3e303a550b9594899bafd4498b531ea7c86e'>976f3e30 ^
81190251 ^
976f3e30 ^
976f3e30 ^
0331cbe2 ^


0331cbe2 ^

9537592b ^
0331cbe2 ^
81190251 ^
0331cbe2 ^
81190251 ^
0331cbe2 ^
0331cbe2 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40