Skip to content

Commit

Permalink
Make custom tag folder search recursive
Browse files Browse the repository at this point in the history
closes #139
  • Loading branch information
jcberquist committed Oct 7, 2021
1 parent c9ef9db commit d1e3720
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/custom_tag_index/custom_tag_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@

def index(custom_tag_path):
custom_tags = {}
for path in os.listdir(custom_tag_path):
if path.endswith(".cfm") or path.endswith(".cfc"):
full_file_path = custom_tag_path.replace("\\", "/") + "/" + path
file_index = index_file(full_file_path)
if file_index:
custom_tags[full_file_path] = file_index
for path, directories, filenames in os.walk(custom_tag_path):
for filename in filenames:
if filename.endswith(".cfm") or filename.endswith(".cfc"):
full_file_path = path.replace("\\", "/") + "/" + filename
file_index = index_file(full_file_path)
if file_index:
custom_tags[full_file_path] = file_index
return custom_tags


Expand Down

0 comments on commit d1e3720

Please sign in to comment.