mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
fix: don't save search files of balance account (close #1125)
This commit is contained in:
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…
x
Reference in New Issue
Block a user