From 5d53aab4a25d315ef94b31c70d85cb805a8acc2e Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Thu, 23 Jun 2011 10:56:53 +1000 Subject: [PATCH] exec: LookPath should not search %PATH% for files like c:cmd.exe R=golang-dev CC=golang-dev https://golang.org/cl/4632055 --- src/pkg/exec/lp_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/exec/lp_windows.go b/src/pkg/exec/lp_windows.go index 5a74c8ee5b..47763458f8 100644 --- a/src/pkg/exec/lp_windows.go +++ b/src/pkg/exec/lp_windows.go @@ -56,7 +56,7 @@ func LookPath(file string) (f string, err os.Error) { } exts = append(exts, e) } - if strings.Contains(file, `\`) || strings.Contains(file, `/`) { + if strings.IndexAny(file, `:\/`) != -1 { if f, err = findExecutable(file, exts); err == nil { return }