mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🐛 The plugin switch status is not synchronized https://github.com/siyuan-note/siyuan/issues/16155
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
635f8b3bf5
commit
8eb0d04393
1 changed files with 13 additions and 0 deletions
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue