diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attachment.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/attachment.go b/lib/attachment.go index a5f1b034..4dd3f41d 100644 --- a/lib/attachment.go +++ b/lib/attachment.go @@ -11,6 +11,7 @@ import ( "strings" "git.sr.ht/~rjarry/aerc/lib/log" + "git.sr.ht/~rjarry/aerc/lib/xdg" "github.com/emersion/go-message/mail" "github.com/pkg/errors" ) @@ -68,7 +69,7 @@ func (fa *FileAttachment) Name() string { } func (fa *FileAttachment) WriteTo(w *mail.Writer) error { - f, err := os.Open(fa.path) + f, err := os.Open(xdg.ExpandHome(fa.path)) if err != nil { return errors.Wrap(err, "os.Open") } |