src/nnn.c | 16 ++++++++-------- diff --git a/src/nnn.c b/src/nnn.c index f19bc83503335be878725af4eda33ef8cff0d068..9d8abf98aac97895c512ae3b94030e308fc3f022 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4954,22 +4954,18 @@ setenv(env_cfg[NNNLVL], xitoa(r), 1); return TRUE; } -static int sum_bsize(const char *UNUSED(fpath), const struct stat *sb, int typeflag, struct FTW *UNUSED(ftwbuf)) +static int sum_bsize(const char *UNUSED(fpath), const struct stat *sb, int UNUSED(typeflag), struct FTW *UNUSED(ftwbuf)) { - if (sb->st_blocks - && ((typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint_t)sb->st_ino))) - || typeflag == FTW_D)) + if (sb->st_blocks && (sb->st_nlink <= 1 || test_set_bit((uint_t)sb->st_ino))) ent_blocks += sb->st_blocks; ++num_files; return 0; } -static int sum_asize(const char *UNUSED(fpath), const struct stat *sb, int typeflag, struct FTW *UNUSED(ftwbuf)) +static int sum_asize(const char *UNUSED(fpath), const struct stat *sb, int UNUSED(typeflag), struct FTW *UNUSED(ftwbuf)) { - if (sb->st_size - && ((typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint_t)sb->st_ino))) - || typeflag == FTW_D)) + if (sb->st_size && (sb->st_nlink <= 1 || test_set_bit((uint_t)sb->st_ino))) ent_blocks += sb->st_size; ++num_files; @@ -5100,6 +5096,8 @@ dir_blocks += dirwalk(buf, &sb); if (g_state.interrupt) goto exit; + ndents = n; + redraw(path); } } else { /* Do not recount hard links */ @@ -5232,6 +5230,8 @@ num_files = num_saved; if (g_state.interrupt) goto exit; + ndents = n; + redraw(path); } else { dentp->blocks = (cfg.apparentsz ? sb.st_size : sb.st_blocks); /* Do not recount hard links */