This commit is contained in:
1-6
2023-07-26 15:27:10 +08:00
parent d3211fc37f
commit 4c47c7c386
+3 -1
View File
@@ -113,11 +113,12 @@ func initPlugins() {
defer pluginLock.Unlock() defer pluginLock.Unlock()
// fmt.Println("new", new, key) // fmt.Println("new", new, key)
if new != "install" {
if vv, ok := plugins_id.Load(key); ok { if vv, ok := plugins_id.Load(key); ok {
filename := vv.(string) filename := vv.(string)
if new == "" { if new == "" {
os.RemoveAll(filepath.Dir(filename)) os.RemoveAll(filepath.Dir(filename))
} else if new != "install" { } else {
fmt.Println("WriteFile", []byte(new)) fmt.Println("WriteFile", []byte(new))
os.WriteFile(filename, []byte(new), 0755) os.WriteFile(filename, []byte(new), 0755)
} }
@@ -125,6 +126,7 @@ func initPlugins() {
Now: "", Now: "",
} }
} }
}
if new == "install" { if new == "install" {
for _, p := range plugin_list { for _, p := range plugin_list {