🐛 Kernel crash when WPS opens Excel asset https://github.com/siyuan-note/siyuan/issues/17010 (#17011)

This commit is contained in:
Jeffrey Chen
2026-02-11 19:20:58 +08:00
committed by GitHub
parent 2403275fb0
commit 3c2c33b35c
2 changed files with 8 additions and 9 deletions
+8 -4
View File
@@ -86,8 +86,10 @@ func HandleAssetsRemoveEvent(assetAbsPath string) {
if !filelock.IsExist(assetAbsPath) {
return
}
if ".DS_Store" == filepath.Base(assetAbsPath) {
if gulu.File.IsDir(assetAbsPath) {
return
}
if filelock.IsHidden(assetAbsPath) {
return
}
@@ -106,8 +108,10 @@ func HandleAssetsChangeEvent(assetAbsPath string) {
if !filelock.IsExist(assetAbsPath) {
return
}
if ".DS_Store" == filepath.Base(assetAbsPath) {
if gulu.File.IsDir(assetAbsPath) {
return
}
if filelock.IsHidden(assetAbsPath) {
return
}
-5
View File
@@ -21,7 +21,6 @@ package model
import (
"os"
"path/filepath"
"strings"
"time"
"github.com/88250/gulu"
@@ -72,10 +71,6 @@ func watchAssets() {
return
}
if strings.HasSuffix(event.Name, ".tmp") {
continue
}
lastEvent = event
timer.Reset(time.Millisecond * 100)
case err, ok := <-assetsWatcher.Errors: