From 4c47c7c3869b7eb872bccc4e2a52318d31782916 Mon Sep 17 00:00:00 2001 From: 1-6 Date: Wed, 26 Jul 2023 15:27:10 +0800 Subject: [PATCH] x --- core/plugin_core.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/core/plugin_core.go b/core/plugin_core.go index f24c2fb..7f319f8 100644 --- a/core/plugin_core.go +++ b/core/plugin_core.go @@ -113,16 +113,18 @@ func initPlugins() { defer pluginLock.Unlock() // fmt.Println("new", new, key) - if vv, ok := plugins_id.Load(key); ok { - filename := vv.(string) - if new == "" { - os.RemoveAll(filepath.Dir(filename)) - } else if new != "install" { - fmt.Println("WriteFile", []byte(new)) - os.WriteFile(filename, []byte(new), 0755) - } - return &storage.Final{ - Now: "", + if new != "install" { + if vv, ok := plugins_id.Load(key); ok { + filename := vv.(string) + if new == "" { + os.RemoveAll(filepath.Dir(filename)) + } else { + fmt.Println("WriteFile", []byte(new)) + os.WriteFile(filename, []byte(new), 0755) + } + return &storage.Final{ + Now: "", + } } }