From 0bac0f9dad065bb895060ca03a70c59302c0bbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20P=C3=B6schel?= Date: Sun, 14 Jan 2024 00:02:00 +0100 Subject: [PATCH] caja-file-operations: fix estimate for queued copy Fixes the condition for showing an estimate of the remaining duration in case a copy operation is queued, correctly considering the current transfer rate. --- libcaja-private/caja-file-operations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index 8676800ea..4a6314b11 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -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);