Quellcode durchsuchen

bug():save mqtt yaml (#502)

Co-authored-by: EMqmyd <mayuedong@emx.io>
EMQmyd vor 4 Jahren
Ursprung
Commit
a6dda19905
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      plugins/sourceMeta.go

+ 2 - 1
plugins/sourceMeta.go

@@ -384,7 +384,8 @@ func (this *sourceProperty) saveCf(pluginName string) error {
 	}
 	}
 
 
 	dir := path.Join(confDir, "sources")
 	dir := path.Join(confDir, "sources")
-	if "mqtt_source" == pluginName {
+	if "mqtt" == pluginName {
+		pluginName = "mqtt_source"
 		dir = confDir
 		dir = confDir
 	}
 	}
 	filePath := path.Join(dir, pluginName+".yaml")
 	filePath := path.Join(dir, pluginName+".yaml")