Skip to content

Commit

Permalink
opxrd: Excluded files as databases in ._as_database_list
Browse files Browse the repository at this point in the history
  • Loading branch information
Somerandomguy10111 committed Dec 18, 2024
1 parent 86d1728 commit d54b794
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opxrd/wrapper/opxrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def as_database_list(cls, root_dirpath : str, download : bool = True, download_i

pattern_dbs = []
print(f'- Loading databases from {root_dirpath}')
for d in os.listdir(path=root_dirpath):
dirpath = os.path.join(root_dirpath, d)
dirpaths = [f.path for f in os.scandir(root_dirpath) if f.is_dir()]
for d in dirpaths:
time.sleep(0.01)
db = PatternDB.load(dirpath=dirpath, strict=True)
db = PatternDB.load(dirpath=d, strict=True)
db.name = d

pattern_dbs.append(db)
Expand Down

0 comments on commit d54b794

Please sign in to comment.