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