Ver Fonte

:art: Filter removed plugin

Daniel há 1 ano atrás
pai
commit
8d2bf65d1a
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      kernel/model/plugin.go

+ 5 - 0
kernel/model/plugin.go

@@ -88,6 +88,11 @@ func LoadPetals(frontend string) (ret []*Petal) {
 
 
 	petals := getPetals()
 	petals := getPetals()
 	for _, petal := range petals {
 	for _, petal := range petals {
+		installPath := filepath.Join(util.DataDir, "plugins", petal.Name)
+		if !filelock.IsExist(installPath) {
+			continue
+		}
+
 		_, petal.DisplayName, petal.Incompatible = bazaar.ParseInstalledPlugin(petal.Name, frontend)
 		_, petal.DisplayName, petal.Incompatible = bazaar.ParseInstalledPlugin(petal.Name, frontend)
 		if !petal.Enabled || petal.Incompatible {
 		if !petal.Enabled || petal.Incompatible {
 			continue
 			continue