Shadowing bug noted after submit by Tom Thorogood.
Change-Id: I5f40cc3863dcd7dba5469f8530e9d0460e7c3e7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/265537
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
// But it's okay if the file is a symlink pointing to a regular
// file, so use os.Stat to follow symlinks and check that.
actualFilePath, _ := OverlayPath(filepath.Join(dir, fi.Name()))
- if fi, err := os.Stat(actualFilePath); err == nil && fi.Mode().IsRegular() {
+ fi, err := os.Stat(actualFilePath)
+ if err == nil && fi.Mode().IsRegular() {
return true, nil
}
if err != nil && firstErr == nil {