mirror of
https://github.com/golang/go
synced 2024-11-19 13:54:56 -07:00
exec: LookPath should not search %PATH% for files like c:cmd.exe
R=golang-dev CC=golang-dev https://golang.org/cl/4632055
This commit is contained in:
parent
96731619ce
commit
5d53aab4a2
@ -56,7 +56,7 @@ func LookPath(file string) (f string, err os.Error) {
|
|||||||
}
|
}
|
||||||
exts = append(exts, e)
|
exts = append(exts, e)
|
||||||
}
|
}
|
||||||
if strings.Contains(file, `\`) || strings.Contains(file, `/`) {
|
if strings.IndexAny(file, `:\/`) != -1 {
|
||||||
if f, err = findExecutable(file, exts); err == nil {
|
if f, err = findExecutable(file, exts); err == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user