mirror of
https://github.com/golang/go
synced 2024-11-23 06:10:05 -07:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
d20b6d8849
commit
9555769aa5
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user