From 8d04978298d8bb2bcb969608a994fe4ef39be3ee Mon Sep 17 00:00:00 2001 From: Jairo Correa Date: Sat, 14 Oct 2023 11:59:35 -0300 Subject: [PATCH] Allow all extensions if extension list is empty --- folder_paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folder_paths.py b/folder_paths.py index 5d121b44..4a38deec 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -146,7 +146,7 @@ def recursive_search(directory, excluded_dir_names=None): return result, dirs def filter_files_extensions(files, extensions): - return sorted(list(filter(lambda a: os.path.splitext(a)[-1].lower() in extensions, files))) + return sorted(list(filter(lambda a: os.path.splitext(a)[-1].lower() in extensions or len(extensions) == 0, files)))