浏览代码

Merge pull request #460 from EMQmyd/pligList

debug():key of g_source
EMQmyd 4 年之前
父节点
当前提交
9ff48d4e91
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/sourceMeta.go

+ 1 - 1
plugins/sourceMeta.go

@@ -49,6 +49,7 @@ func newUiSource(fi *fileSource) *uiSource {
 var g_sourceProperty map[string]*sourceProperty
 
 func readSourceMetaFile(filePath string) error {
+	fileName := path.Base(filePath)
 	ptrMeta := new(fileSource)
 	err := common.ReadJsonUnmarshal(filePath, ptrMeta)
 	if nil != err || 0 == len(ptrMeta.ConfKeys) {
@@ -72,7 +73,6 @@ func readSourceMetaFile(filePath string) error {
 	property.cf = yamlData
 	property.meta = newUiSource(ptrMeta)
 
-	fileName := path.Base(filePath)
 	g_sourceProperty[fileName] = property
 	return err
 }