fix: 修复pkgName == "."时windows下获取包名异常
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user