This commit is contained in:
Liang Ding 2023-01-03 18:19:41 +08:00
parent a6008fbdac
commit c957dfc6b2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -342,6 +342,7 @@ func setLocalStorage(val interface{}) (err error) {
}
func getLocalStorage() (ret map[string]interface{}, err error) {
ret = map[string]interface{}{}
lsPath := filepath.Join(util.DataDir, "storage/local.json")
if !gulu.File.IsExist(lsPath) {
return
@ -353,7 +354,6 @@ func getLocalStorage() (ret map[string]interface{}, err error) {
return
}
ret = map[string]interface{}{}
if err = gulu.JSON.UnmarshalJSON(data, &ret); nil != err {
logging.LogErrorf("unmarshal storage [local] failed: %s", err)
return