diff --git a/cmd/fdroidcl/update.go b/cmd/fdroidcl/update.go index d046079..3a56511 100644 --- a/cmd/fdroidcl/update.go +++ b/cmd/fdroidcl/update.go @@ -15,7 +15,6 @@ import ( "os" "path/filepath" - "github.com/mvdan/basedir" "github.com/mvdan/fdroidcl" ) @@ -102,20 +101,7 @@ func downloadEtag(url, path string, sum []byte) error { } func indexPath(name string) string { - cache, err := basedir.Cache() - if err != nil { - log.Fatalf("Could not determine cache dir: %v", err) - } - return filepath.Join(appSubdir(cache), repoName+".jar") -} - -func appSubdir(dir string, subdir ...string) string { - elems := append([]string{dir, "fdroidcl"}, subdir...) - p := filepath.Join(elems...) - if err := os.MkdirAll(p, 0755); err != nil { - log.Fatalf("Could not create app dir: %v", err) - } - return p + return filepath.Join(mustConfig(), repoName+".jar") } func mustLoadIndex() *fdroidcl.Index {