From da31f5a7a6430dc9489cb794e2f17b89aaaf5e3d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 5 May 2023 15:21:21 +0800 Subject: [PATCH] :art: Kernel API supports load plugins https://github.com/siyuan-note/siyuan/issues/8044 --- kernel/util/working.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/util/working.go b/kernel/util/working.go index ba36d9a2c..55157ec35 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -355,6 +355,11 @@ func initPathDir() { logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data widgets folder [%s] failed: %s", widgets, err) } + plugins := filepath.Join(DataDir, "plugins") + if err := os.MkdirAll(plugins, 0755); nil != err && !os.IsExist(err) { + logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data plugins folder [%s] failed: %s", widgets, err) + } + emojis := filepath.Join(DataDir, "emojis") if err := os.MkdirAll(emojis, 0755); nil != err && !os.IsExist(err) { logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data emojis folder [%s] failed: %s", widgets, err)