Skip to content

Commit

Permalink
readdir: use mode from uppermost layer
Browse files Browse the repository at this point in the history
differently than dev/ino number, use the uppermost mode found.

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Oct 3, 2019
1 parent cf99ad7 commit 0a8c375
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,8 @@ make_ovl_node (struct ovl_data *lo, const char *path, struct ovl_layer *layer, c
{
ret->tmp_ino = st.st_ino;
ret->tmp_dev = st.st_dev;
mode = st.st_mode;
if (mode == 0)
mode = st.st_mode;
ret->last_layer = it;
}
goto no_fd;
Expand All @@ -1208,7 +1209,8 @@ make_ovl_node (struct ovl_data *lo, const char *path, struct ovl_layer *layer, c
{
ret->tmp_ino = st.st_ino;
ret->tmp_dev = st.st_dev;
mode = st.st_mode;
if (mode == 0)
mode = st.st_mode;
ret->last_layer = it;
}

Expand Down

0 comments on commit 0a8c375

Please sign in to comment.