Commit 94acd5a0 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54558 from sttts/sttts-fix-zero-case-import-verifier

Automatic merge from submit-queue (batch tested with PRs 54537, 54558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. importverifier: fix isPathUnder for base == path isPathUnder returned false for base == path, but should return true.
parents d8736073 acbe87d6
......@@ -110,7 +110,7 @@ func isPathUnder(base, path string) (bool, error) {
// if path is below base, the relative path
// from base to path will not start with `../`
return !strings.HasPrefix(relPath, "."), nil
return !strings.HasPrefix(relPath, ".."), nil
}
// forbiddenImportsFor determines all of the forbidden
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment