From 737c3f6559232949d3229d04bb0b954fba5e374b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 5 Feb 2025 11:28:01 +0800 Subject: [PATCH] :art: Improve assets path calc https://github.com/siyuan-note/siyuan/issues/14011 --- kernel/model/assets.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 50909bd4e..42f916146 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)) }