From: Michael Tremer Date: Sat, 4 Jan 2025 13:29:10 +0000 (+0000) Subject: filelist: Increment progress after a file has been processed X-Git-Tag: 0.9.30~546 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec9d7837a1392339968e6e9ab0d84a03d4646294;p=pakfire.git 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 --- 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!