fix: 修复pkgName == "."时windows下获取包名异常

master
me262 3 years ago
parent 78defd91d9
commit ae72f8d9a3

@ -98,7 +98,9 @@ func (m *cnfModel) GetPkgName() string {
}
if len(pkgName) == 0 || pkgName == "." {
list = strings.Split(tools.GetModelPath(), "/")
curDir := tools.GetModelPath()
curDir = strings.Replace(curDir, "\\", "/", -1)
list = strings.Split(curDir, "/")
if len(list) > 0 {
pkgName = list[len(list)-1]
}

Loading…
Cancel
Save