Fixed reindex percent calculation

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2021-07-11 14:09:16 +02:00
parent 4ebf76e405
commit 03c22264ea

View File

@ -135,8 +135,7 @@ uint64 retrieve_email_by_metadata_id(struct session_data *sdata, struct data *da
unlink(filename);
if(progressbar){
uint64 delta = to_id - from_id;
if(delta == 0) delta = 1;
uint64 delta = to_id - from_id + 1;
printf("processed: %8llu [%3d%%]\r", reindexed, (int)(100*reindexed/delta));
fflush(stdout);