fix: Increase maximum read limit in read_file_content function
This commit is contained in:
parent
cec4c6c60b
commit
2ad0855e52
@ -940,7 +940,7 @@ async def read_file_content(cog: commands.Cog, file_path: str) -> Dict[str, Any]
|
||||
return f.read()
|
||||
|
||||
content = await asyncio.to_thread(sync_read)
|
||||
max_len = 10000 # Increased limit for potentially larger reads
|
||||
max_len = 1000000 # Increased limit for potentially larger reads
|
||||
content_trunc = content[:max_len] + ('...' if len(content) > max_len else '')
|
||||
print(f"--- UNSAFE READ: Successfully read {len(content)} bytes from {file_path}. Returning {len(content_trunc)} bytes. ---")
|
||||
return {"status": "success", "file_path": file_path, "content": content_trunc}
|
||||
|
Loading…
x
Reference in New Issue
Block a user