From bf9a279d1a2dc40d625fa2a1be92c697996d7e8a Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 10 Aug 2024 11:16:00 +0300 Subject: [PATCH] (file_eta_prepare_for_show): join checks of eta_secs. Signed-off-by: Andrew Borodin --- src/filemanager/filegui.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c index 9124483eb..907d08f77 100644 --- a/src/filemanager/filegui.c +++ b/src/filemanager/filegui.c @@ -350,14 +350,17 @@ file_eta_prepare_for_show (char *buffer, double eta_secs, gboolean always_show) { char _fmt_buff[BUF_TINY]; - if (eta_secs <= 0.5 && !always_show) + if (eta_secs <= 0.5) { - *buffer = '\0'; - return; + if (!always_show) + { + *buffer = '\0'; + return; + } + + eta_secs = 1.0; } - if (eta_secs <= 0.5) - eta_secs = 1; file_frmt_time (_fmt_buff, eta_secs); g_snprintf (buffer, BUF_TINY, _("ETA %s"), _fmt_buff); }