fix: disable default db name

This commit is contained in:
hexxa 2022-01-29 14:09:24 +08:00 committed by Hexxa
parent 00bbb12843
commit 39d644931c
3 changed files with 6 additions and 4 deletions

View file

@ -132,11 +132,12 @@ func initDeps(cfg gocfg.ICfg) *depidx.Deps {
opensLimit := cfg.GrabInt("Fs.OpensLimit")
openTTL := cfg.GrabInt("Fs.OpenTTL")
readerTTL := cfg.GrabInt("Server.WriteTimeout") / 1000 // millisecond -> second
dbPath := cfg.GrabString("Db.DbPath")
ider := simpleidgen.New()
filesystem := local.NewLocalFS(rootPath, 0660, opensLimit, openTTL, readerTTL, ider)
jwtEncDec := jwt.NewJWTEncDec(secret)
kv := boltdbpvd.New(rootPath, 1024)
kv := boltdbpvd.New(dbPath, 1024)
users, err := userstore.NewKVUserStore(kv)
if err != nil {
panic(fmt.Sprintf("fail to init user store: %s", err))