Updated msword-search
This commit is contained in:
parent
4ddce7cfbe
commit
387062074a
1 changed files with 54 additions and 53 deletions
|
|
@ -25,7 +25,7 @@ REGEX_DOC_FILES = re.compile(r'\.docx?$', re.IGNORECASE)
|
|||
def scan_for_docs(path):
|
||||
for entry in os.scandir(path):
|
||||
if entry.is_dir(follow_symlinks=False):
|
||||
yield from scantree(entry.path)
|
||||
yield from scan_for_docs(entry.path)
|
||||
elif entry.is_file and REGEX_DOC_FILES.search(entry.name):
|
||||
yield entry
|
||||
|
||||
|
|
@ -79,3 +79,4 @@ if __name__ == '__main__':
|
|||
except:
|
||||
major_exception()
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
|
|||
Loading…
Reference in a new issue