(copy_file_file): fix the ETA calculation.

Pass only the size of the remaining part of file to
copy_file_file_display_progress().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-08-10 11:38:40 +03:00
parent bf9a279d1a
commit 6d3c41082c

View File

@ -2766,7 +2766,7 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
if (is_first_time || usecs > FILEOP_UPDATE_INTERVAL_US) if (is_first_time || usecs > FILEOP_UPDATE_INTERVAL_US)
{ {
copy_file_file_display_progress (tctx, ctx, tv_current, tv_transfer_start, copy_file_file_display_progress (tctx, ctx, tv_current, tv_transfer_start,
file_size, file_part); file_size - ctx->do_reget, file_part);
tv_last_update = tv_current; tv_last_update = tv_current;
} }