fix: normalize extension case in sandbox file extraction

Fixes bug where 'Dockerfile' in TEXT_EXTENSIONS wouldn't match after
lowercasing file_path because the extension itself wasn't lowercased.
This commit is contained in:
Bentlybro
2026-02-16 14:18:25 +00:00
parent 5e554526e2
commit 6ac011e36c

View File

@@ -195,8 +195,8 @@ async def extract_sandbox_files(
# Check file type (case-insensitive for extensions)
file_path_lower = file_path.lower()
is_text = any(file_path_lower.endswith(ext) for ext in TEXT_EXTENSIONS)
is_binary = any(file_path_lower.endswith(ext) for ext in BINARY_EXTENSIONS)
is_text = any(file_path_lower.endswith(ext.lower()) for ext in TEXT_EXTENSIONS)
is_binary = any(file_path_lower.endswith(ext.lower()) for ext in BINARY_EXTENSIONS)
# Determine if we should extract this file
if text_only: