23 lines
482 B
Diff
23 lines
482 B
Diff
--- a/commands/msgview/open.go
|
|
+++ b/commands/msgview/open.go
|
|
@@ -5,6 +5,7 @@
|
|
"io"
|
|
"mime"
|
|
"os"
|
|
+ "path"
|
|
"path/filepath"
|
|
|
|
"git.sr.ht/~rjarry/aerc/app"
|
|
@@ -56,9 +57,9 @@
|
|
app.PushError(err.Error())
|
|
return
|
|
}
|
|
- filename := part.FileName()
|
|
+ filename := path.Base(part.FileName())
|
|
var tmpFile *os.File
|
|
- if filename == "" {
|
|
+ if filename == "." {
|
|
extension := ""
|
|
if exts, _ := mime.ExtensionsByType(mimeType); len(exts) > 0 {
|
|
extension = exts[0]
|