fix: handle missing backend extension list

This commit is contained in:
Marco Rodolfi
2023-06-22 13:16:37 +02:00
parent b2a1b172e2
commit 777e7893e3
+2 -1
View File
@@ -225,7 +225,8 @@ class Utilities:
folders.append({"file": file, "filest": filest, "is_dir": True})
elif include_files:
# Handle requested extensions if present
if 'all_files' in include_ext or splitext(file.name)[1].lstrip('.') in include_ext:
if len(include_ext) == 0 or 'all_files' in include_ext \
or splitext(file.name)[1].lstrip('.') in include_ext:
if (is_hidden and include_hidden) or not is_hidden:
files.append({"file": file, "filest": filest, "is_dir": False})
# Filter logic