Skip to content

Commit

Permalink
Merge pull request #131 from mzfr/hidden-files
Browse files Browse the repository at this point in the history
Ignore some hidden files and folders
  • Loading branch information
razzeee authored Jan 18, 2019
2 parents 9da946f + 04856cd commit 76377d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kodi_addon_checker/handle_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ def create_file_index(path: str):
"""
file_index = []
for root, folders, files in os.walk(path, topdown=True):
if ".directory" in files:
files.remove(".directory")
if ".git" in folders:
folders.remove(".git")
for file_name in files:
file_index.append({"path": root, "name": file_name})
if not os.path.basename(root).startswith("."):
file_index.append({"path": root, "name": file_name})

return file_index


Expand Down

0 comments on commit 76377d9

Please sign in to comment.