aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msgview
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-08-23 21:36:23 +0200
committerRobin Jarry <robin@jarry.cc>2023-08-27 18:44:12 +0200
commita5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988 (patch)
treebe2e5f55fc21980489dca61947ea6b9819853ec3 /commands/msgview
parentfff16640ad7cd8c4b73187fbce10f2aa558701be (diff)
downloadaerc-a5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988.tar.gz
xdg: get rid of deprecated dependencies
github.com/mitchellh/go-homedir has not received any update since 2019. The last release of github.com/kyoh86/xdg was in 2020 and it has been marked as deprecated by its author. Replace these with internal functions. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'commands/msgview')
-rw-r--r--commands/msgview/save.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/msgview/save.go b/commands/msgview/save.go
index 170ef7c1..1ffdaf92 100644
--- a/commands/msgview/save.go
+++ b/commands/msgview/save.go
@@ -10,10 +10,10 @@ import (
"time"
"git.sr.ht/~sircmpwn/getopt"
- "github.com/mitchellh/go-homedir"
"git.sr.ht/~rjarry/aerc/commands"
"git.sr.ht/~rjarry/aerc/config"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/log"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/widgets"
@@ -40,8 +40,7 @@ func (s Save) Complete(aerc *widgets.Aerc, args []string) []string {
if defaultPath != "" && !isAbsPath(path) {
path = filepath.Join(defaultPath, path)
}
- path, _ = homedir.Expand(path)
- return commands.CompletePath(path)
+ return commands.CompletePath(xdg.ExpandHome(path))
}
type saveParams struct {
@@ -99,10 +98,7 @@ func (s Save) Execute(aerc *widgets.Aerc, args []string) error {
path = filepath.Join(defaultPath, path)
}
- path, err = homedir.Expand(path)
- if err != nil {
- return err
- }
+ path = xdg.ExpandHome(path)
mv, ok := aerc.SelectedTabContent().(*widgets.MessageViewer)
if !ok {