🎨 订正索引时排除 assets 目录下的 .sy 文件

This commit is contained in:
Liang Ding 2023-02-11 22:50:47 +08:00
parent 6ad89c12c1
commit 6a6939257e
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -114,7 +114,7 @@ func fixBlockTreeByFileSys() {
boxPath := filepath.Join(util.DataDir, box.ID)
var paths []string
filepath.Walk(boxPath, func(path string, info os.FileInfo, err error) error {
if !info.IsDir() && filepath.Ext(path) == ".sy" {
if !info.IsDir() && filepath.Ext(path) == ".sy" && !strings.Contains(filepath.ToSlash(path), "/assets/") {
p := path[len(boxPath):]
p = filepath.ToSlash(p)
paths = append(paths, p)