瀏覽代碼

Read before write

master
Arun Prakash Jana 5 年之前
父節點
當前提交
0ae1ef656c
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 4 行新增3 行删除
  1. +4
    -3
      src/nnn.c

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

@@ -2519,9 +2519,10 @@ static int dentfill(char *path, struct entry **dents)
/* Flag if this is a dir or symlink to a dir */
if (S_ISDIR(sb.st_mode))
dentp->flags |= DIR_OR_LINK_TO_DIR;
else if (!S_ISLNK(sb.st_mode))
dentp->flags &= ~DIR_OR_LINK_TO_DIR;
else {
else if (!S_ISLNK(sb.st_mode)) {
if (dentp->flags & DIR_OR_LINK_TO_DIR)
dentp->flags &= ~DIR_OR_LINK_TO_DIR;
} else {
if (!fstatat(fd, namep, &sb, 0)) {
if (S_ISDIR(sb.st_mode))
dentp->flags |= DIR_OR_LINK_TO_DIR;


Loading…
取消
儲存