aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/configure.go
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 /worker/imap/configure.go
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 'worker/imap/configure.go')
-rw-r--r--worker/imap/configure.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/worker/imap/configure.go b/worker/imap/configure.go
index c325de23..49464689 100644
--- a/worker/imap/configure.go
+++ b/worker/imap/configure.go
@@ -9,10 +9,10 @@ import (
"strings"
"time"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/worker/lib"
"git.sr.ht/~rjarry/aerc/worker/middleware"
"git.sr.ht/~rjarry/aerc/worker/types"
- "github.com/mitchellh/go-homedir"
"golang.org/x/oauth2"
)
@@ -170,10 +170,7 @@ func (w *IMAPWorker) handleConfigure(msg *types.Configure) error {
w.observer = newObserver(w.config, w.worker)
if name, ok := msg.Config.Params["folder-map"]; ok {
- file, err := homedir.Expand(name)
- if err != nil {
- return err
- }
+ file := xdg.ExpandHome(name)
f, err := os.Open(file)
if err != nil {
return err