Browse Source

:art: Kernel API supports load plugins https://github.com/siyuan-note/siyuan/issues/8044

Liang Ding 2 năm trước cách đây
mục cha
commit
da31f5a7a6
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      kernel/util/working.go

+ 5 - 0
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)