diff options
Diffstat (limited to 'libgo/go/os/exec/lp_unix.go')
-rw-r--r-- | libgo/go/os/exec/lp_unix.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/os/exec/lp_unix.go b/libgo/go/os/exec/lp_unix.go index a221137..2d3a919 100644 --- a/libgo/go/os/exec/lp_unix.go +++ b/libgo/go/os/exec/lp_unix.go @@ -47,8 +47,9 @@ func LookPath(file string) (string, error) { // Unix shell semantics: path element "" means "." dir = "." } - if err := findExecutable(dir + "/" + file); err == nil { - return dir + "/" + file, nil + path := dir + "/" + file + if err := findExecutable(path); err == nil { + return path, nil } } return "", &Error{file, ErrNotFound} |