Skip to content

Commit 38d8dbf

Browse files
committed
Fix error when trying to match relative paths with exclude patterns
* bdx/binary.py (Exclusion.matches): Don't attempt to convert the path into a path relative to root dir.
1 parent c493753 commit 38d8dbf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

bdx/binary.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,8 @@ class Exclusion:
592592
def matches(self, path: Path, root_dir: Path) -> bool:
593593
"""Return true if this exclusion pattern matches ``path``."""
594594
flags = glob.GLOBSTAR
595-
relative = path
596-
if path.is_absolute():
597-
relative = path.relative_to(root_dir)
598595
return glob.globmatch(
599596
path, self.pattern, root_dir=root_dir, flags=flags
600-
) or glob.globmatch(
601-
relative, self.pattern, root_dir=root_dir, flags=flags
602597
)
603598

604599

0 commit comments

Comments
 (0)