mirror of https://github.com/golang/go.git
cmd/compile: use path.Join in importfile
Change-Id: Ib413b0cb16405965455d7764a8c4a22bf431389b Reviewed-on: https://go-review.googlesource.com/19850 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
e7524d51fd
commit
e34295e647
|
|
@ -729,11 +729,7 @@ func importfile(f *Val, indent []byte) {
|
|||
if localimport != "" {
|
||||
prefix = localimport
|
||||
}
|
||||
cleanbuf := prefix
|
||||
cleanbuf += "/"
|
||||
cleanbuf += path_
|
||||
cleanbuf = path.Clean(cleanbuf)
|
||||
path_ = cleanbuf
|
||||
path_ = path.Join(prefix, path_)
|
||||
|
||||
if isbadimport(path_) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in New Issue