Skip to content

Commit

Permalink
Make sure final 100% update is reported in progress.
Browse files Browse the repository at this point in the history
From ralfjunker in #414.
  • Loading branch information
0-wiz-0 committed Mar 15, 2024
1 parent 10e72c9 commit 314b54d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zip_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 314b54d

Please sign in to comment.