From 15c0828a2f873b756f5ebdd9e52fc525531077cc Mon Sep 17 00:00:00 2001 From: coffee coder <64681762+c0ffeec0der@users.noreply.github.com> Date: Tue, 9 Jun 2020 05:19:31 +0700 Subject: [PATCH] Bug fix: for compare known, on windows, use "\" instead of "/" (#115) * Enhancement: Subdir detect runtime os. If windows changes "\" to "/" * Bug fix: for compare known, on windows, use "\" instead of "/" * Bug fix: for compare known, on windows, use "\" instead of "/" Co-authored-by: c0feec0der <> --- pkg/packages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/packages.go b/pkg/packages.go index 98828ae..8f83965 100644 --- a/pkg/packages.go +++ b/pkg/packages.go @@ -202,7 +202,7 @@ func checkLegacyNameTaken(legacyName string, pkgName string) (bool, error) { func known(deps map[string]deps.Dependency, p string) bool { p = filepath.ToSlash(p) for _, d := range deps { - k := d.Name() + k := filepath.ToSlash(d.Name()) if strings.HasPrefix(p, k) || strings.HasPrefix(k, p) { return true }