Consider only dirs and files in nftw(3)

This commit is contained in:
Arun Prakash Jana 2017-05-02 18:20:03 +05:30
parent fa31e920c5
commit b730c116d6
No known key found for this signature in database
GPG key ID: A75979F35C080412

9
nnn.c
View file

@ -1149,13 +1149,8 @@ show_help(void)
static int static int
sum_bsizes(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) sum_bsizes(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf)
{ {
/* Handle permission problems */ if(typeflag == FTW_F || typeflag == FTW_D)
if(typeflag == FTW_NS) { blk_size += sb->st_blocks;
printmsg("No stats (permissions ?)");
return 0;
}
blk_size += sb->st_blocks;
return 0; return 0;
} }