Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for paths starting with / #5

Open
malykhinvi opened this issue May 18, 2021 · 0 comments
Open

False positive for paths starting with / #5

malykhinvi opened this issue May 18, 2021 · 0 comments

Comments

@malykhinvi
Copy link

malykhinvi commented May 18, 2021

I haven't had enough time to come up with a solution, but I prepared a PR with tests to reproduce the issue: #4

  1. filepath is /foo-bar
  2. substr is /foo
  3. containsPath returns true, but looks like it should return false if partialMatch is not passed.

Looks like the problem is here:

contains-path/index.js

Lines 67 to 69 in f22e056

if (ch === '/') {
return true;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant