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()
// 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: "",
}
}
}