From ae72f8d9a3712225a26c75e2a20a46247a869e2b Mon Sep 17 00:00:00 2001 From: me262 Date: Mon, 31 May 2021 17:29:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8DpkgName=20=3D=3D=20?= =?UTF-8?q?"."=E6=97=B6windows=E4=B8=8B=E8=8E=B7=E5=8F=96=E5=8C=85?= =?UTF-8?q?=E5=90=8D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/view/model/gencnf/gencnf.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/view/model/gencnf/gencnf.go b/data/view/model/gencnf/gencnf.go index 8b712c5..fe2c93a 100644 --- a/data/view/model/gencnf/gencnf.go +++ b/data/view/model/gencnf/gencnf.go @@ -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] }