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:
Matthew Dempsky 2016-02-23 02:14:32 -08:00
parent e7524d51fd
commit e34295e647
1 changed files with 1 additions and 5 deletions

View File

@ -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