removes hidden files from directory listing

This commit is contained in:
buttle 2021-06-19 08:21:42 +02:00
parent b46fb336f4
commit 825dc4bf45
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ def get_directory_content(dir_path):
content = [] content = []
for p in Path(dir_path).iterdir(): for p in Path(dir_path).iterdir():
file = Path(p) file = Path(p)
if file.name.startswith("."):
continue
model_type = (Path(file.name).suffix).lstrip('.').lower() model_type = (Path(file.name).suffix).lstrip('.').lower()
is_object_file = True if model_type in OBJECT_TYPES else False is_object_file = True if model_type in OBJECT_TYPES else False
item = { item = {