From ec9d7837a1392339968e6e9ab0d84a03d4646294 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 4 Jan 2025 13:29:10 +0000 Subject: [PATCH] filelist: Increment progress after a file has been processed The progressbar suspiciously was "done" when there was still some work to do and the application looked like it had stalled. Signed-off-by: Michael Tremer --- src/pakfire/filelist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pakfire/filelist.c b/src/pakfire/filelist.c index ccbfeb82f..552023fe5 100644 --- a/src/pakfire/filelist.c +++ b/src/pakfire/filelist.c @@ -478,14 +478,14 @@ int pakfire_filelist_walk(struct pakfire_filelist* list, // Call the callback once for every element on the list for (unsigned int i = 0; i < list->num_files; i++) { - // Increment the progress - if (progress) - pakfire_progress_increment(progress, 1); - // Call the callback r = callback(list->ctx, list->files[i], data); if (r) goto ERROR; + + // Increment the progress + if (progress) + pakfire_progress_increment(progress, 1); } // Done! -- 2.47.2