From b7beff91e58062f7bf523ceecefa73c45b68646e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 26 Jul 2023 11:01:53 +0800 Subject: [PATCH 1/2] :bug: Assets starting with `.` should not be considered missing assets https://github.com/siyuan-note/siyuan/issues/8821 --- kernel/model/assets.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 88e3de4ca..ab15c07dd 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -738,6 +738,14 @@ func MissingAssets() (ret []string) { } if "" == assetsPathMap[dest] { + if strings.HasPrefix(dest, "assets/.") { + // Assets starting with `.` should not be considered missing assets https://github.com/siyuan-note/siyuan/issues/8821 + if !gulu.File.IsExist(filepath.Join(util.DataDir, dest)) { + ret = append(ret, dest) + continue + } + } + ret = append(ret, dest) continue } From 7548b1008c2ad80cd668f5afe5fe5400331147e7 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 26 Jul 2023 11:05:22 +0800 Subject: [PATCH 2/2] :bug: Assets starting with `.` should not be considered missing assets https://github.com/siyuan-note/siyuan/issues/8821 --- kernel/model/assets.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index ab15c07dd..2ca92b366 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -742,11 +742,10 @@ func MissingAssets() (ret []string) { // Assets starting with `.` should not be considered missing assets https://github.com/siyuan-note/siyuan/issues/8821 if !gulu.File.IsExist(filepath.Join(util.DataDir, dest)) { ret = append(ret, dest) - continue } + } else { + ret = append(ret, dest) } - - ret = append(ret, dest) continue } }