Skip to content

Commit

Permalink
caja-file-operations: fix estimate for queued copy
Browse files Browse the repository at this point in the history
Fixes the condition for showing an estimate of the remaining duration in
case a copy operation is queued, correctly considering the current
transfer rate.
  • Loading branch information
basicmaster committed Feb 3, 2024
1 parent e2a2786 commit a595b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcaja-private/caja-file-operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -3079,8 +3079,8 @@ report_copy_progress (CopyMoveJob *copy_job,
transfer_rate = transfer_info->num_bytes / elapsed;
}

if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE &&
transfer_rate > 0) {
if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE ||
transfer_rate <= 0) {
char *s;
/* Translators: %S will expand to a size like "2 bytes" or "3 MB", so something like "4 kb of 4 MB" */
s = f (_("%S of %S"), transfer_info->num_bytes, total_size);
Expand Down

0 comments on commit a595b81

Please sign in to comment.