cache: use fs.CacheDir to make the default directory for the cache

NB this changes the default dir for the cache
This commit is contained in:
Nick Craig-Wood 2017-11-20 14:38:28 +00:00
parent af50f31f7d
commit f80f7a0509
2 changed files with 7 additions and 5 deletions

View file

@ -9,6 +9,7 @@ import (
"io/ioutil"
"math/rand"
"path"
"path/filepath"
"strconv"
"sync"
"testing"
@ -42,7 +43,7 @@ func TestInternalInit(t *testing.T) {
var err error
// delete the default path
dbPath := path.Join(path.Dir(fs.ConfigPath), "cache", *RemoteName+".db")
dbPath := filepath.Join(fs.CacheDir, "cache-backend", *RemoteName+".db")
boltDb = cache.GetPersistent(dbPath, true)
fstest.Initialise()