From b730c116d6eca260ae9138b1d9613eb9f336c46b Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 2 May 2017 18:20:03 +0530 Subject: [PATCH] Consider only dirs and files in nftw(3) --- nnn.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nnn.c b/nnn.c index 33278528..a43bde1d 100644 --- a/nnn.c +++ b/nnn.c @@ -1149,13 +1149,8 @@ show_help(void) static int sum_bsizes(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) { - /* Handle permission problems */ - if(typeflag == FTW_NS) { - printmsg("No stats (permissions ?)"); - return 0; - } - - blk_size += sb->st_blocks; + if(typeflag == FTW_F || typeflag == FTW_D) + blk_size += sb->st_blocks; return 0; }