Skip to content

Commit 51b42a7

Browse files
authored
🐛 fix: fix exclude exact matched directory not work (#54)
1 parent 00bc0ee commit 51b42a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/watchfs/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def match_pattern(path: Path, pattern: Path) -> bool:
1212
if pattern.is_dir():
13-
return pattern in path.parents
13+
return pattern in [path, *path.parents]
1414
return path.match(str(pattern))
1515

1616

0 commit comments

Comments
 (0)