From 29678939f3be54e89f90551ec82727c820536715 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Tue, 15 Aug 2023 20:16:04 +0800 Subject: [PATCH] :sparkles: Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874 --- kernel/model/asset_content.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.go index 7df4d91e1..be4559edb 100644 --- a/kernel/model/asset_content.go +++ b/kernel/model/asset_content.go @@ -282,6 +282,8 @@ func buildAssetContentOrderBy(orderBy int) string { var assetContentSearcher = NewAssetsSearcher() func IndexAssetContent(absPath string) { + defer logging.Recover() + assetsDir := util.GetDataAssetsAbsPath() ext := strings.ToLower(filepath.Ext(absPath)) @@ -353,6 +355,8 @@ type AssetsSearcher struct { } func (searcher *AssetsSearcher) FullIndex() { + defer logging.Recover() + assetsDir := util.GetDataAssetsAbsPath() if !gulu.File.IsDir(assetsDir) { return