Commit 9555769a authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/link: use filepath.Join rather than d + "/" + f

Fixes #26917

Change-Id: I676f016ed43aaa523b6d3a87b28a1d1d2ebe72c4
Reviewed-on: https://go-review.googlesource.com/c/153237
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d20b6d88
......@@ -136,13 +136,13 @@ func findlib(ctxt *Link, lib string) (string, bool) {
// try dot, -L "libdir", and then goroot.
for _, dir := range ctxt.Libdir {
if ctxt.linkShared {
pname = dir + "/" + pkg + ".shlibname"
pname = filepath.Join(dir, pkg+".shlibname")
if _, err := os.Stat(pname); err == nil {
isshlib = true
break
}
}
pname = dir + "/" + name
pname = filepath.Join(dir, name)
if _, err := os.Stat(pname); err == nil {
break
}
......
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