mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Remove asset content indexes when deleting asset files https://github.com/siyuan-note/siyuan/issues/9010
This commit is contained in:
parent
2fae8a008a
commit
2d61568fad
3 changed files with 20 additions and 6 deletions
|
|
@ -60,8 +60,11 @@ func watchAssets() {
|
|||
// 重新缓存资源文件,以便使用 /资源 搜索
|
||||
go cache.LoadAssets()
|
||||
|
||||
// 索引资源文件内容
|
||||
IndexAssetContent(event.Path)
|
||||
if watcher.Remove == event.Op {
|
||||
RemoveIndexAssetContent(event.Path)
|
||||
} else {
|
||||
IndexAssetContent(event.Path)
|
||||
}
|
||||
case err, ok := <-assetsWatcher.Error:
|
||||
if !ok {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue