From 2111283ec91cfc2909488d1497f6dff168e4ef68 Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Wed, 24 May 2017 22:37:14 -0400 Subject: [PATCH] use filepath.Clean on user inputted paths --- query/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query/query.go b/query/query.go index 9771d24..d9c94b9 100644 --- a/query/query.go +++ b/query/query.go @@ -52,7 +52,7 @@ func (q *Query) Execute(workFunc interface{}) { seen := make(map[string]bool) excluder := &RegexpExclude{exclusions: q.Sources["exclude"]} for _, src := range q.Sources["include"] { - filepath.Walk(src, func(path string, info os.FileInfo, err error) error { + filepath.Walk(filepath.Clean(src), func(path string, info os.FileInfo, err error) error { if path == "." || path == ".." || err != nil { return nil }