]> git.ipfire.org Git - pakfire.git/commitdiff
progressbar: Allow restart when in finished status
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Apr 2021 17:18:37 +0000 (17:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Apr 2021 17:18:37 +0000 (17:18 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/progressbar.c

index e3545c5d28e31d8820c9c5037957abc8fe2e4cd2..081a1af88027281e3c3ca78789b04aedb345f7f4 100644 (file)
@@ -194,7 +194,7 @@ static time_t pakfire_progressbar_elapsed_time(struct pakfire_progressbar* p) {
 }
 
 int pakfire_progressbar_start(struct pakfire_progressbar* p, unsigned long value) {
-       if (p->status != PAKFIRE_PROGRESSBAR_INIT)
+       if (p->status == PAKFIRE_PROGRESSBAR_RUNNING)
                return EINVAL;
 
        // Set status