From 28d5821c2937f24bb0ca0a136b505ffd87e57472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 12 Jul 2015 21:12:10 -0700 Subject: [PATCH] Move from mvdan/appdir to mvdan/basedir --- cmd/fdroidcl/install.go | 6 +++--- cmd/fdroidcl/update.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/fdroidcl/install.go b/cmd/fdroidcl/install.go index f266f25..4a28281 100644 --- a/cmd/fdroidcl/install.go +++ b/cmd/fdroidcl/install.go @@ -8,7 +8,7 @@ import ( "log" "path/filepath" - "github.com/mvdan/appdir" + "github.com/mvdan/basedir" ) var cmdInstall = &Command{ @@ -49,7 +49,7 @@ func runInstall(args []string) { } func apksCacheDir() string { - cache, err := appdir.Cache() + cache, err := basedir.Cache() if err != nil { log.Fatalf("Could not determine cache dir: %v", err) } @@ -57,7 +57,7 @@ func apksCacheDir() string { } func apkPath(apkname string) string { - cache, err := appdir.Cache() + cache, err := basedir.Cache() if err != nil { log.Fatalf("Could not determine cache dir: %v", err) } diff --git a/cmd/fdroidcl/update.go b/cmd/fdroidcl/update.go index 9ff5394..dc5b322 100644 --- a/cmd/fdroidcl/update.go +++ b/cmd/fdroidcl/update.go @@ -15,7 +15,7 @@ import ( "os" "path/filepath" - "github.com/mvdan/appdir" + "github.com/mvdan/basedir" "github.com/mvdan/fdroidcl" ) @@ -101,15 +101,15 @@ func downloadEtag(url, path string, sum []byte) error { } func indexPath(name string) string { - cache, err := appdir.Cache() + 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(appdir string, subdir ...string) string { - elems := append([]string{appdir, "fdroidcl"}, subdir...) +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)