tighter constraints on allowed paths.
Change-Id: Ie6b121e4733e45288a36dbc2426f556fd5e2832d
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ import (
|
||||
// Valid checks that p will not confuse the go tool if added to packages.
|
||||
func Valid(p string, packages []Package) bool {
|
||||
for _, pkg := range packages {
|
||||
if strings.HasPrefix(pkg.path, p) {
|
||||
if strings.HasPrefix(pkg.path, p) || strings.HasPrefix(p, pkg.path) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user