Commit 5d53aab4 authored by Alex Brainman's avatar Alex Brainman

exec: LookPath should not search %PATH% for files like c:cmd.exe

R=golang-dev
CC=golang-dev
https://golang.org/cl/4632055
parent 96731619
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment