diff options
author | Robin Jarry <robin@jarry.cc> | 2023-08-23 21:36:23 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-27 18:44:12 +0200 |
commit | a5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988 (patch) | |
tree | be2e5f55fc21980489dca61947ea6b9819853ec3 /lib/ipc/receive.go | |
parent | fff16640ad7cd8c4b73187fbce10f2aa558701be (diff) | |
download | aerc-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 'lib/ipc/receive.go')
-rw-r--r-- | lib/ipc/receive.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ipc/receive.go b/lib/ipc/receive.go index 12df3411..29ed0808 100644 --- a/lib/ipc/receive.go +++ b/lib/ipc/receive.go @@ -6,14 +6,13 @@ import ( "net" "net/url" "os" - "path" "strings" "sync/atomic" "time" "git.sr.ht/~rjarry/aerc/config" + "git.sr.ht/~rjarry/aerc/lib/xdg" "git.sr.ht/~rjarry/aerc/log" - "github.com/kyoh86/xdg" ) type AercServer struct { @@ -22,7 +21,7 @@ type AercServer struct { } func StartServer(handler Handler) (*AercServer, error) { - sockpath := path.Join(xdg.RuntimeDir(), "aerc.sock") + sockpath := xdg.RuntimePath("aerc.sock") // remove the socket if it is not connected to a session if err := ConnectAndExec(nil); err != nil { os.Remove(sockpath) |