🎨 Remove asset content indexes when deleting asset files https://github.com/siyuan-note/siyuan/issues/9010
This commit is contained in:
parent
2d61568fad
commit
ca73a70112
1 changed files with 1 additions and 2 deletions
|
@ -74,7 +74,7 @@ func watchAssets() {
|
|||
lastEvent = event
|
||||
timer.Reset(time.Millisecond * 100)
|
||||
|
||||
if lastEvent.Op&fsnotify.Rename == fsnotify.Rename {
|
||||
if lastEvent.Op&fsnotify.Rename == fsnotify.Rename || lastEvent.Op&fsnotify.Write == fsnotify.Write {
|
||||
IndexAssetContent(lastEvent.Name)
|
||||
} else if lastEvent.Op&fsnotify.Remove == fsnotify.Remove {
|
||||
RemoveIndexAssetContent(lastEvent.Name)
|
||||
|
@ -87,7 +87,6 @@ func watchAssets() {
|
|||
case <-timer.C:
|
||||
//logging.LogInfof("assets changed: %s", lastEvent)
|
||||
if lastEvent.Op&fsnotify.Write == fsnotify.Write {
|
||||
// 外部修改已有资源文件后纳入云端同步 https://github.com/siyuan-note/siyuan/issues/4694
|
||||
IncSync()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue