Replace Python globbing library.

This was motivated by the need to recurse down paths.
This commit is contained in:
D. Berge
2020-08-28 13:49:43 +02:00
parent fb4d25643e
commit 639ac237e3
4 changed files with 12 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ database.
"""
import os
from glob import glob
import pathlib
import re
import configuration
import p111
@@ -43,8 +43,8 @@ if __name__ == '__main__':
print(f"Path prefix: {fileprefix}")
for globspec in final_p111["globs"]:
fullglob = os.path.join(fileprefix, globspec)
for filepath in glob(fullglob):
for filepath in pathlib.Path(fileprefix).glob(globspec):
filepath = str(filepath)
print(f"Found {filepath}")
if not db.file_in_db(filepath):