commit | f36c7c5983e039e36e187d7fcd7e7e5a1aa2d74f | [log] [tgz] |
---|---|---|
author | Bryan C. Mills <bcmills@google.com> | Fri Jan 13 13:59:19 2023 -0500 |
committer | Gopher Robot <gobot@golang.org> | Tue Jan 31 20:33:05 2023 +0000 |
tree | 3e57f57870a77ae109c3c5ab277fe13bea088abf | |
parent | 5f00ce86334aa7e80ab825882db1a080f1b56404 [diff] |
cmd/go: traverse module-root symlinks in Walk calls fsys.Walk, like filepath.Walk, avoids traversing symlinks. Also like filepath.Walk, it follows a symlink at the root if the root path ends in a file separator (consistent with POSIX pathname resolution¹). If the user's working directory is within a repository stored in (and symlinked to) a different filesystem path, we want to follow the symlink instead of treating the module as completely empty. ¹https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/basedefs/V1_chap04.html#tag_04_12 Fixes #50807. Updates #57754. Change-Id: Idaf6168dfffafe879e05b4ded5fda287fcd3eeec Reviewed-on: https://go-review.googlesource.com/c/go/+/463179 Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.