Skip to content

Commit

Permalink
Correcting bug in issue 40
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardo.lambertucci committed Jul 27, 2022
1 parent 04b18b3 commit ee01764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codeowners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def path_to_regex(pattern: str) -> Pattern[str]:
slash_pos = pattern.find("/")
anchored = slash_pos > -1 and slash_pos != len(pattern) - 1

regex += r"\A" if anchored else r"(?:\A|/)"
regex += r"\A/" if anchored else r"(?:\A|/)"

matches_dir = pattern[-1] == "/"
matches_no_subdirs = pattern[-2:] == "/*"
Expand Down

0 comments on commit ee01764

Please sign in to comment.