Skip to content
Snippets Groups Projects
Commit f937e68d authored by deuce's avatar deuce
Browse files

Show bytes transferred when file size unavailable.

parent 2096866e
Branches
Tags
No related merge requests found
......@@ -614,7 +614,7 @@ void install_sbbs(dist_t *dist,struct server_ent_t *server) {
}
}
}
printf("Downloading %s ",url);
printf("Downloading %s ",url);
offset=0;
while((ret1=read(remote,buf,sizeof(buf)))>=0) {
ret2=write(fout,buf,ret1);
......@@ -626,7 +626,9 @@ void install_sbbs(dist_t *dist,struct server_ent_t *server) {
}
offset+=ret2;
if(flen)
printf("\b\b\b\b%3lu%%",(long)(((float)offset/(float)flen)*100.0));
printf("\b\b\b\b\b\b\b\b\b\b%3lu%% ",(long)(((float)offset/(float)flen)*100.0));
else
printf("\b\b\b\b\b\b\b\b\b\b%10lu",offset);
fflush(stdout);
}
printf("\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment