]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] 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>
Mon, 6 May 2019 20:25:45 +0000 (20:25 +0000)
commit4a1d39bb8072c1805b37c6b07037f1a151ee9f58
tree78e7b8bdac73b63841ac7620560f255a0a448160
parente02d81890f6737ef479dd296e51efcdcd33c04b7
[release-branch.go1.12] 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
Fixes #31763

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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/175441
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/internal/imports/scan.go
src/cmd/go/testdata/script/mod_symlink.txt