From 435dfa788454bc33f5c82d3fcfdc0a1dcf1b2644 Mon Sep 17 00:00:00 2001 From: Jozen Blue Martinez Date: Sun, 11 Feb 2024 03:34:16 +0800 Subject: [PATCH] fix(filepicker_ls): use case insensitive matching for file exts (#585) --- backend/src/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/utilities.py b/backend/src/utilities.py index b0e23b88d..edde682d8 100644 --- a/backend/src/utilities.py +++ b/backend/src/utilities.py @@ -238,7 +238,7 @@ async def filepicker_ls(self, elif include_files: # Handle requested extensions if present if len(include_ext) == 0 or 'all_files' in include_ext \ - or splitext(file.name)[1].lstrip('.') in include_ext: + or splitext(file.name)[1].lstrip('.').upper() in (ext.upper() for ext in include_ext): if (is_hidden and include_hidden) or not is_hidden: files.append({"file": file, "filest": filest, "is_dir": False}) # Filter logic