🐛 保存文件

This commit is contained in:
Wuyi无疑 2025-01-23 21:50:44 +08:00 committed by GitHub
parent 64ccc5786f
commit 456fed244b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,8 +124,8 @@ def to_json(msg: list, name: str, uin: str):
def store_file(path: Path, file: str): def store_file(path: Path, file: str):
file_content = base64.b64decode(file).decode() file_content = base64.b64decode(file)
with open(path, 'w') as f: with open(path, 'wb') as f:
f.write(file_content) f.write(file_content)