info->write_streams.completed_bytes >> 20,
info->write_streams.total_bytes >> 20,
percent_done);
- if (info->write_streams.completed_bytes == info->write_streams.total_bytes)
+ if (info->write_streams.completed_bytes >= info->write_streams.total_bytes)
putchar('\n');
break;
case WIMLIB_PROGRESS_MSG_SCAN_BEGIN:
info->extract.completed_bytes >> 20,
info->extract.total_bytes >> 20,
percent_done);
- if (info->extract.completed_bytes == info->extract.total_bytes)
+ if (info->extract.completed_bytes >= info->extract.total_bytes)
putchar('\n');
break;
case WIMLIB_PROGRESS_MSG_EXTRACT_DENTRY:
if (ret != 0)
goto out;
if (progress_func &&
- args->progress.extract.completed_bytes >= next_progress &&
- args->progress.extract.total_bytes != 0)
+ args->progress.extract.completed_bytes >= next_progress)
{
progress_func(WIMLIB_PROGRESS_MSG_EXTRACT_STREAMS,
&args->progress);
- next_progress += bytes_per_progress;
+ if (args->progress.extract.completed_bytes >=
+ args->progress.extract.total_bytes)
+ {
+ next_progress = ~0ULL;
+ } else {
+ next_progress =
+ min (args->progress.extract.completed_bytes +
+ bytes_per_progress,
+ args->progress.extract.total_bytes);
+ }
}
}
}