Merge pull request #1 from pmjdebruijn/master
.chkbitignore: add wildcard matching
This commit is contained in:
commit
9366259daa
@ -1,3 +1,4 @@
|
|||||||
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@ -43,7 +44,10 @@ class Index:
|
|||||||
return os.path.join(self.path, INDEX)
|
return os.path.join(self.path, INDEX)
|
||||||
|
|
||||||
def should_ignore(self, name):
|
def should_ignore(self, name):
|
||||||
return name in self.ignore
|
for ignore in self.ignore:
|
||||||
|
if fnmatch.fnmatch(name, ignore):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def _setmod(self):
|
def _setmod(self):
|
||||||
self.modified = True
|
self.modified = True
|
||||||
|
Reference in New Issue
Block a user