This commit is contained in:
parent
b87c0bff3e
commit
423ef5c4b1
@ -279,7 +279,7 @@ func (id *Identity) SaveBackgroundJob() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = os.WriteFile(filepath.Join(GetConfig().StoragePath, ".jobs"), jsonjobs, 0644)
|
||||
err = os.WriteFile(filepath.Join(GetConfig().StoragePath, ".jobs"), jsonjobs, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ package client
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"path/filepath"
|
||||
|
||||
"forge.redroom.link/yves/meowlib"
|
||||
"github.com/dgraph-io/badger"
|
||||
@ -18,7 +19,7 @@ type ServerStorage struct {
|
||||
|
||||
// Open a badger database from struct ServerStorage
|
||||
func (ss *ServerStorage) open() error {
|
||||
opts := badger.DefaultOptions(ss.DbFile)
|
||||
opts := badger.DefaultOptions(filepath.Join(GetConfig().StoragePath, ss.DbFile))
|
||||
opts.Logger = nil
|
||||
var err error
|
||||
ss.db, err = badger.Open(opts)
|
||||
|
Loading…
Reference in New Issue
Block a user