Skip to content

Commit

Permalink
修复:元组索引错误
Browse files Browse the repository at this point in the history
Aruelius committed May 27, 2020
1 parent 80a2b8e commit 81bdef0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud189/api/core.py
Original file line number Diff line number Diff line change
@@ -622,7 +622,7 @@ def down_file_by_id(self, fid, save_path='./Download', callback=None) -> int:
total_size = int(resp.headers['Content-Length'])

# ---
file_path = save_path + os.sep + infos['fileName']
file_path = save_path + os.sep + infos.name
logger.debug(f'Save file to {file_path=}')
if os.path.exists(file_path):
now_size = os.path.getsize(file_path) # 本地已经下载的文件大小
@@ -644,7 +644,7 @@ def down_file_by_id(self, fid, save_path='./Download', callback=None) -> int:
f.flush()
now_size += len(chunk)
if callback is not None:
callback(infos['fileName'], total_size, now_size)
callback(infos.name, total_size, now_size)
logger.debug(f"{total_size=}, {now_size=}")
return Cloud189.SUCCESS

0 comments on commit 81bdef0

Please sign in to comment.