Call callback_progress before the byte limiter sleeps.
This commit is contained in:
parent
51bbe54f2d
commit
b41597ec71
1 changed files with 2 additions and 2 deletions
|
@ -501,11 +501,11 @@ def copy_file(
|
|||
destination_handle.write(data_chunk)
|
||||
results.written_bytes += data_bytes
|
||||
|
||||
callback_progress(destination, results.written_bytes, source_bytes)
|
||||
|
||||
if bytes_per_second is not None:
|
||||
bytes_per_second.limit(data_bytes)
|
||||
|
||||
callback_progress(destination, results.written_bytes, source_bytes)
|
||||
|
||||
if results.written_bytes == 0:
|
||||
# For zero-length files, we want to get at least one call in there.
|
||||
callback_progress(destination, results.written_bytes, source_bytes)
|
||||
|
|
Loading…
Reference in a new issue