Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Fix ocr crash

Daniel00a3084d3ea3
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index 1b35dc6217..bc87f3bd27 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -92,6 +92,9 @@ func HandleAssetsRemoveEvent(assetAbsPath string) {
if filelock.IsHidden(assetAbsPath) {
return
}
+ if strings.HasSuffix(assetAbsPath, ".tmp") {
+ return
+ }
removeIndexAssetContent(assetAbsPath)
removeAssetThumbnail(assetAbsPath)
@@ -114,6 +117,9 @@ func HandleAssetsChangeEvent(assetAbsPath string) {
if filelock.IsHidden(assetAbsPath) {
return
}
+ if strings.HasSuffix(assetAbsPath, ".tmp") {
+ return
+ }
indexAssetContent(assetAbsPath)
removeAssetThumbnail(assetAbsPath)