Skip to content
Snippets Groups Projects
Commit 9d341950 authored by Yorhel's avatar Yorhel
Browse files

dir_common.c: Don't display total size when it's not known

The total size isn't calculated when exporting to a file.
parent 59a9c6b8
No related branches found
No related tags found
No related merge requests found
......@@ -128,7 +128,9 @@ static void draw_progress() {
nccreate(10, width, "Scanning...");
ncprint(2, 2, "Total items: %-8d size: %s", dir_output.items, formatsize(dir_output.size));
ncprint(2, 2, "Total items: %-8d", dir_output.items);
if(dir_output.size)
ncprint(2, 23, "size: %s", formatsize(dir_output.size));
ncprint(3, 2, "Current item: %s", cropstr(dir_curpath, width-18));
ncaddstr(8, width-18, "Press q to abort");
......@@ -181,9 +183,11 @@ void dir_draw() {
case 1:
if(dir_fatalerr)
fprintf(stderr, "\r%s.\n", dir_fatalerr);
else
else if(dir_output.size)
fprintf(stderr, "\r%-55s %8d files /%s",
cropstr(dir_curpath, 55), dir_output.items, formatsize(dir_output.size));
else
fprintf(stderr, "\r%-65s %8d files", cropstr(dir_curpath, 65), dir_output.items);
break;
case 2:
browse_draw();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment