fetch(1): correct progress accounting after previous commit

MFC after:	1 month
This commit is contained in:
Eugene Grosbein 2022-01-24 11:17:24 +07:00
parent e3bad5f7aa
commit a4efbe0d6d

View File

@ -835,7 +835,7 @@ fetch(char *URL, const char *path)
if (us.size != -1 && count < us.size) {
warnx("%s appears to be truncated: %jd/%jd bytes",
path, (intmax_t)count, (intmax_t)us.size);
if(!o_stdout && a_flag && us.size > size_prev) {
if(!o_stdout && a_flag && count > size_prev) {
fclose(f);
if (w_secs)
sleep(w_secs);