From a5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 23 Aug 2023 21:36:23 +0200 Subject: 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 Reviewed-by: Moritz Poldrack --- commands/history.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'commands/history.go') diff --git a/commands/history.go b/commands/history.go index 7aa42fab..cc85f3ba 100644 --- a/commands/history.go +++ b/commands/history.go @@ -6,11 +6,10 @@ import ( "fmt" "io" "os" - "path" "sync" + "git.sr.ht/~rjarry/aerc/lib/xdg" "git.sr.ht/~rjarry/aerc/log" - "github.com/kyoh86/xdg" ) type cmdHistory struct { @@ -92,9 +91,9 @@ func (h *cmdHistory) initialize() { var err error openFlags := os.O_RDWR | os.O_EXCL - histPath := path.Join(xdg.CacheHome(), "aerc", "history") + histPath := xdg.CachePath("aerc", "history") if _, err := os.Stat(histPath); os.IsNotExist(err) { - _ = os.MkdirAll(path.Join(xdg.CacheHome(), "aerc"), 0o700) // caught by OpenFile + _ = os.MkdirAll(xdg.CachePath("aerc"), 0o700) // caught by OpenFile openFlags |= os.O_CREATE } -- cgit