From 777bbd60b3a2f7d987f9b2e37ca1efd930ac80d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 19 Jul 2015 13:35:08 -0700 Subject: [PATCH] Store index jars in persistent storage --- cmd/fdroidcl/update.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) 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 {