mirror of https://github.com/Xhofe/alist
fix: don't save search files of balance account (close #1125)
parent
eb549f2631
commit
6a7eb8b3eb
|
@ -5,6 +5,7 @@ import (
|
|||
"github.com/Xhofe/alist/model"
|
||||
"github.com/Xhofe/alist/utils"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func KeyCache(path string, account *model.Account) string {
|
||||
|
@ -15,6 +16,9 @@ func KeyCache(path string, account *model.Account) string {
|
|||
}
|
||||
|
||||
func SaveSearchFiles[T model.ISearchFile](key string, obj []T) {
|
||||
if strings.Contains(key, ".balance") {
|
||||
return
|
||||
}
|
||||
err := model.DeleteSearchFilesByPath(key)
|
||||
if err != nil {
|
||||
log.Errorln("failed create search files", err)
|
||||
|
|
Loading…
Reference in New Issue