mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-10 06:03:38 +00:00
extract: fix false warning about pattern never matching, fixes #4110
This commit is contained in:
parent
de53164931
commit
f5f5311e2b
1 changed files with 5 additions and 2 deletions
|
@ -131,8 +131,11 @@ class PatternMatcher:
|
|||
self.include_patterns = include_patterns
|
||||
|
||||
def get_unmatched_include_patterns(self):
|
||||
"Note that this only returns patterns added via *add_includepaths*."
|
||||
return [p for p in self.include_patterns if p.match_count == 0]
|
||||
"""Note that this only returns patterns added via *add_includepaths* and it
|
||||
won't return PathFullPattern patterns as we do not match_count for them.
|
||||
"""
|
||||
return [p for p in self.include_patterns
|
||||
if p.match_count == 0 and not isinstance(p, PathFullPattern)]
|
||||
|
||||
def add_inclexcl(self, patterns):
|
||||
"""Add list of patterns (of type CmdTuple) to internal list.
|
||||
|
|
Loading…
Add table
Reference in a new issue