Update: optimize universal file read ability.

This commit is contained in:
Stitch-z 2023-09-20 14:07:00 +08:00
parent 6ae0a6a98b
commit 35067ab0d1

View file

@ -66,7 +66,7 @@ class File:
try:
chunk_size = chunk_size or cls.CHUNK_SIZE
async with aiofiles.open(file_path, mode="rb") as reader:
chunks = []
chunks = list()
while True:
chunk = await reader.read(chunk_size)
if not chunk: