summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--commands/msgview/save.go2
-rw-r--r--widgets/msgviewer.go3
2 files changed, 5 insertions, 0 deletions
diff --git a/commands/msgview/save.go b/commands/msgview/save.go
index 33cd45f..99abe0e 100644
--- a/commands/msgview/save.go
+++ b/commands/msgview/save.go
@@ -94,6 +94,8 @@ func (Save) Execute(aerc *widgets.Aerc, args []string) error {
 			save_dir = path
 			if filename, ok := p.Part.DispositionParams["filename"]; ok {
 				save_file = filename
+			} else if filename, ok := p.Part.Params["name"]; ok {
+				save_file = filename
 			} else {
 				timestamp := time.Now().Format("2006-01-02-150405")
 				save_file = fmt.Sprintf("aerc_%v", timestamp)
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 9d71c3e..6de729e 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -319,6 +319,9 @@ func (ps *PartSwitcher) Draw(ctx *ui.Context) {
 			strings.ToLower(part.part.MIMESubType))
 		if filename, ok := part.part.DispositionParams["filename"]; ok {
 			name += fmt.Sprintf(" (%s)", filename)
+		} else if filename, ok := part.part.Params["name"]; ok {
+			// workaround golang not supporting RFC2231 besides ASCII and UTF8
+			name += fmt.Sprintf(" (%s)", filename)
 		}
 		ctx.Printf(len(part.index)*2, y+i, style, "%s", name)
 	}
in&id=c5983ab3cc60be25842ea8da12f7b3b7b450a390'>^
11162888 ^

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