Skip to content

False positive for paths starting with / #5

Open
@malykhinvi

Description

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;
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      False positive for paths starting with `/` · Issue #5 · jonschlinkert/contains-path