mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Report offset instead of 0 in case file size is missing (for file_id)
This commit is contained in:
parent
9c91720104
commit
4ba5e63034
1 changed files with 2 additions and 2 deletions
|
|
@ -1296,7 +1296,7 @@ class Client(Methods, BaseClient):
|
||||||
offset += limit
|
offset += limit
|
||||||
|
|
||||||
if progress:
|
if progress:
|
||||||
progress(self, min(offset, size), size, *progress_args)
|
progress(self, min(offset, size) if size != 0 else offset, size, *progress_args)
|
||||||
|
|
||||||
r = session.send(
|
r = session.send(
|
||||||
functions.upload.GetFile(
|
functions.upload.GetFile(
|
||||||
|
|
@ -1378,7 +1378,7 @@ class Client(Methods, BaseClient):
|
||||||
offset += limit
|
offset += limit
|
||||||
|
|
||||||
if progress:
|
if progress:
|
||||||
progress(self, min(offset, size), size, *progress_args)
|
progress(self, min(offset, size) if size != 0 else offset, size, *progress_args)
|
||||||
|
|
||||||
if len(chunk) < limit:
|
if len(chunk) < limit:
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue