feat: clear cache after change

This commit is contained in:
Noah Hsu
2022-06-30 22:51:49 +08:00
parent 2b1726614b
commit 53416172e7
5 changed files with 31 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package fs
import (
"github.com/alist-org/alist/v3/internal/operations"
"io"
"mime"
"net/http"
@ -12,6 +13,14 @@ import (
"github.com/pkg/errors"
)
func ClearCache(path string) {
account, actualPath, err := operations.GetAccountAndActualPath(path)
if err != nil {
return
}
operations.ClearCache(account, actualPath)
}
func containsByName(files []model.Obj, file model.Obj) bool {
for _, f := range files {
if f.GetName() == file.GetName() {