瀏覽代碼

bug():save mqtt yaml (#502)

Co-authored-by: EMqmyd <mayuedong@emx.io>
EMQmyd 4 年之前
父節點
當前提交
a6dda19905
共有 1 個文件被更改,包括 2 次插入1 次删除
  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")
-	if "mqtt_source" == pluginName {
+	if "mqtt" == pluginName {
+		pluginName = "mqtt_source"
 		dir = confDir
 	}
 	filePath := path.Join(dir, pluginName+".yaml")