Skip to content

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

:art: Improve assets path calc https://github.com/siyuan-note/siyuan/issues/14011

Daniel737c3f655923
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index 50909bd4ef..42f9161462 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -20,7 +20,6 @@ import (
"bytes"
"errors"
"fmt"
- "io"
"io/fs"
"mime"
"net/http"
@@ -379,7 +378,7 @@ func GetAssetAbsPath(relativePath string) (ret string, err error) {
if p := filepath.ToSlash(path); strings.HasSuffix(p, relativePath) {
if gulu.File.IsExist(path) {
ret = path
- return io.EOF
+ return fs.SkipAll
}
}
return nil
@@ -393,7 +392,6 @@ func GetAssetAbsPath(relativePath string) (ret string, err error) {
return
}
}
-
return "", errors.New(fmt.Sprintf(Conf.Language(12), relativePath))
}