]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/imports: use the full path to resolve symlinks
authorBryan C. Mills <bcmills@google.com>
Thu, 21 Feb 2019 17:00:12 +0000 (12:00 -0500)
committerBryan C. Mills <bcmills@google.com>
Sat, 23 Feb 2019 22:02:23 +0000 (22:02 +0000)
commit3726d91d680b20d147f5b0b6222232d10930d121
tree62017225703c4f70a3816be12e0666cd8a86d1b6
parent8f1e2d4ef7c8d415b0a2e4ae08e16e4722c795d5
cmd/go/internal/imports: use the full path to resolve symlinks

info.Name returns a name relative to the directory, so we need to
prefix that directory in the Stat call.

(This was missed in CL 141097 due to the fact that the test only
happened to check symlinks in the current directory.)

This allows the misc/ tests to work in module mode on platforms that
support symlinks.

Updates #30228
Updates #28107

Change-Id: Ie31836382df0cbd7d203b7a8b637c4743d68b6f3
Reviewed-on: https://go-review.googlesource.com/c/163517
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/imports/scan.go
src/cmd/go/testdata/script/mod_symlink.txt