diff --git a/src/cmd/vendor/golang.org/x/mod/module/module.go b/src/cmd/vendor/golang.org/x/mod/module/module.go index 89bd3ede277..dd14dc771ce 100644 --- a/src/cmd/vendor/golang.org/x/mod/module/module.go +++ b/src/cmd/vendor/golang.org/x/mod/module/module.go @@ -811,6 +811,10 @@ func MatchPrefixPatterns(globs, target string) bool { continue } + // Remove the trailing slash in glob + if glob[len(glob)-1] == '/' { + glob = glob[:len(glob)-1] + } // A glob with N+1 path elements (N slashes) needs to be matched // against the first N+1 path elements of target, // which end just before the N+1'th slash.