From 777e7893e3d52f6aa401dbff3335c56f0e5e99c3 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Thu, 22 Jun 2023 13:16:37 +0200 Subject: fix: handle missing backend extension list --- backend/utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/utilities.py b/backend/utilities.py index 1057ac9d..bcb35578 100644 --- a/backend/utilities.py +++ b/backend/utilities.py @@ -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 -- cgit v1.2.3