diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2017-05-02 18:20:03 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2017-05-02 18:20:03 +0530 |
commit | b730c116d6eca260ae9138b1d9613eb9f336c46b (patch) | |
tree | 513b2252d39760970c1bd858366821a5a355b7a6 /nnn.c | |
parent | fa31e920c5a6ef0f7d4ef6ebe454acb3ebaf15bc (diff) | |
download | nnn-b730c116d6eca260ae9138b1d9613eb9f336c46b.tar.gz |
Consider only dirs and files in nftw(3)
Diffstat (limited to 'nnn.c')
-rw-r--r-- | nnn.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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; } |