瀏覽代碼

Check for file first (more in number)

master
Arun Prakash Jana 4 年之前
父節點
當前提交
e0cdbcb521
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. +6
    -4
      src/nnn.c

+ 6
- 4
src/nnn.c 查看文件

@@ -4271,8 +4271,9 @@ static void launch_app(const char *path, char *newpath)

static int sum_bsize(const char *UNUSED(fpath), const struct stat *sb, int typeflag, struct FTW *UNUSED(ftwbuf))
{
if (sb->st_blocks && (typeflag == FTW_D
|| (typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint)sb->st_ino)))))
if (sb->st_blocks
&& ((typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint)sb->st_ino)))
|| typeflag == FTW_D))
ent_blocks += sb->st_blocks;

++num_files;
@@ -4281,8 +4282,9 @@ static int sum_bsize(const char *UNUSED(fpath), const struct stat *sb, int typef

static int sum_asize(const char *UNUSED(fpath), const struct stat *sb, int typeflag, struct FTW *UNUSED(ftwbuf))
{
if (sb->st_size && (typeflag == FTW_D
|| (typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint)sb->st_ino)))))
if (sb->st_size
&& ((typeflag == FTW_F && (sb->st_nlink <= 1 || test_set_bit((uint)sb->st_ino)))
|| typeflag == FTW_D))
ent_blocks += sb->st_size;

++num_files;


Loading…
取消
儲存