From 6a7eb8b3ebca4ab334352ccbc1a096bbdd9f1f13 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Sat, 21 May 2022 22:12:18 +0800 Subject: [PATCH] fix: don't save search files of balance account (close #1125) --- drivers/base/cache.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/base/cache.go b/drivers/base/cache.go index bde23a17..b0d34189 100644 --- a/drivers/base/cache.go +++ b/drivers/base/cache.go @@ -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)