From 8eb0d043935ebc4bbe7ee86b58bd7c7114a231ea Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 22 Oct 2025 16:25:23 +0800 Subject: [PATCH] :bug: The plugin switch status is not synchronized https://github.com/siyuan-note/siyuan/issues/16155 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/repository.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/model/repository.go b/kernel/model/repository.go index f0147f190..868146748 100644 --- a/kernel/model/repository.go +++ b/kernel/model/repository.go @@ -1586,6 +1586,19 @@ func processSyncMergeResult(exit, byHand bool, mergeResult *dejavu.MergeResult, if parts := strings.Split(file.Path, "/"); 3 < len(parts) { if pluginName := parts[3]; "petals.json" != pluginName { upsertPluginSet.Add(pluginName) + } else { + // 修改了 petals.json 则重新加载所有插件 + // The plugin switch status is not synchronized https://github.com/siyuan-note/siyuan/issues/16155 + entries, err := os.ReadDir(filepath.Join(util.DataDir, "storage", "petal")) + if nil != err { + logging.LogErrorf("read petals dir failed: %s", err) + } else { + for _, entry := range entries { + if entry.IsDir() { + upsertPluginSet.Add(entry.Name()) + } + } + } } } }