浏览代码

:art: Filter removed plugin

Daniel 1 年之前
父节点
当前提交
8d2bf65d1a
共有 1 个文件被更改,包括 5 次插入0 次删除
  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()
 	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)
 		if !petal.Enabled || petal.Incompatible {
 			continue