fix: make extension check case-insensitive in BaseFileComponent (#6256)

fix: Case-insensitive file extension validation in BaseFileComponent

Modify file extension validation to use lowercase comparison, ensuring consistent handling of file extensions across different input cases
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-02-11 12:14:26 -03:00 committed by GitHub
commit 8a5cfa3526
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -492,7 +492,7 @@ class BaseFileComponent(Component, ABC):
self.log(f"Not a file: {file.path.name}")
continue
if file.path.suffix[1:] not in self.valid_extensions:
if file.path.suffix[1:].lower() not in self.valid_extensions:
if self.ignore_unsupported_extensions:
ignored_files.append(file.path.name)
continue