Commit e34295e6 authored by Matthew Dempsky's avatar Matthew Dempsky

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: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent e7524d51
......@@ -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
......
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