From 3b0dd10302713fb2f13e45e6bd3dd8adf432c547 Mon Sep 17 00:00:00 2001 From: qida Date: Tue, 18 Apr 2017 14:35:59 +0800 Subject: [PATCH] =?UTF-8?q?windows=E4=B8=8B=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generate/g_appcode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/g_appcode.go b/generate/g_appcode.go index 2dd9079..26a11ec 100644 --- a/generate/g_appcode.go +++ b/generate/g_appcode.go @@ -967,7 +967,7 @@ func getPackagePath(curpath string) (packpath string) { for _, wg := range wgopath { wg, _ = filepath.EvalSymlinks(path.Join(wg, "src")) - if strings.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) { + if strings.HasPrefix(strings.ToLower(strings.Replace(curpath, "/", "\\", -1)), strings.ToLower(wg)) { haspath = true appsrcpath = wg break