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 <michael.tremer@ipfire.org>
// 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!