diff --git a/source/shell/mufs.c b/source/shell/mufs.c index 8e2d380..87a94ff 100644 --- a/source/shell/mufs.c +++ b/source/shell/mufs.c @@ -316,9 +316,9 @@ int shell_cp(struct console *con, size_t argc, const char **argv) goto err_close_in; } - while (count < total) { - draw_progress(con->fp, count, total); + draw_progress(con->fp, count, total); + while (count < total) { ret = mufs_read(in, data, sizeof data); if (ret == 0) @@ -330,6 +330,7 @@ int shell_cp(struct console *con, size_t argc, const char **argv) break; count += ret; + draw_progress(con->fp, count, total); } fputc('\n', con->fp);