Skip to content

Commit

Permalink
rafs: fix bug in InodeWrapper::is_sock()
Browse files Browse the repository at this point in the history
We incorrectly use is_dir() to check if a file is a socket. This patch
fixes it.

Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn>
  • Loading branch information
SToPire authored and imeoer committed Sep 27, 2024
1 parent 9f439ab commit a4683ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rafs/src/metadata/inode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.is_sock(),
InodeWrapper::V6(i) => i.is_sock(),
InodeWrapper::Ref(i) => i.as_inode().is_dir(),
InodeWrapper::Ref(i) => i.as_inode().is_sock(),
}
}

Expand Down

0 comments on commit a4683ba

Please sign in to comment.