aboutsummaryrefslogtreecommitdiff
path: root/app/compose.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/compose.go')
-rw-r--r--app/compose.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/compose.go b/app/compose.go
index 9f9ebf39..38d94359 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -8,6 +8,7 @@ import (
"net/textproto"
"os"
"os/exec"
+ "path/filepath"
"sort"
"strconv"
"strings"
@@ -29,6 +30,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib/state"
"git.sr.ht/~rjarry/aerc/lib/templates"
"git.sr.ht/~rjarry/aerc/lib/ui"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/worker/types"
"git.sr.ht/~rockorager/vaxis"
@@ -1119,6 +1121,8 @@ func (c *Composer) GetAttachments() []string {
}
func (c *Composer) AddAttachment(path string) {
+ path, _ = filepath.Abs(path)
+ path = xdg.TildeHome(path)
c.attachments = append(c.attachments, lib.NewFileAttachment(path))
c.resetReview()
}