check only the basename of a file by default
This commit is contained in:
parent
e56b2fb739
commit
a3bf1a758c
|
@ -1,5 +1,6 @@
|
|||
import abc
|
||||
import fnmatch
|
||||
import os
|
||||
|
||||
|
||||
class FileHandler(object):
|
||||
|
@ -10,7 +11,8 @@ class FileHandler(object):
|
|||
def supports_file(self, file_obj):
|
||||
"""Does this plugin want to process the file?
|
||||
"""
|
||||
return any(fnmatch.fnmatch(file_obj.path, ip)
|
||||
base_filename = os.path.basename(file_obj.path)
|
||||
return any(fnmatch.fnmatch(base_filename, ip)
|
||||
for ip in self.INTERESTING_PATTERNS)
|
||||
|
||||
@abc.abstractmethod
|
||||
|
|
Loading…
Reference in New Issue