From 314b54d1064e62f1c4c3f67f01d63c67e94afe33 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Fri, 15 Mar 2024 15:20:11 +0100 Subject: [PATCH] Make sure final 100% update is reported in progress. From ralfjunker in #414. --- lib/zip_progress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zip_progress.c b/lib/zip_progress.c index e080514b1..a7ae2cfff 100644 --- a/lib/zip_progress.c +++ b/lib/zip_progress.c @@ -191,7 +191,7 @@ _zip_progress_update(zip_progress_t *progress, double sub_current) { if (progress->callback_progress != NULL) { current = ZIP_MIN(ZIP_MAX(sub_current, 0.0), 1.0) * (progress->end - progress->start) + progress->start; - if (current - progress->last_update > progress->precision) { + if (current - progress->last_update > progress->precision || (progress->last_update < 1 && current == 1)) { progress->callback_progress(progress->za, current, progress->ud_progress); progress->last_update = current; }