Skip to content

Commit

Permalink
Clarified a comment
Browse files Browse the repository at this point in the history
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
  • Loading branch information
dcookspi committed May 10, 2024
1 parent 00ca9a2 commit 687a6e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/spfs-vfs/src/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ impl Filesystem {
entry.size
};
let nlink: u32 = if entry.is_dir() {
// Directory has 2 hardlinks for . and .. plus one for
// each subdirectory. Symlinks do not count.
// Directory has 2 hardlinks, one for . and one for the
// entry in its parent (..), plus one for each
// subdirectory. Symlinks do not count.
(entry.entries.iter().filter(|(_n, e)| e.is_dir()).count() + 2) as u32
} else {
// Everything else just has itself
Expand Down

0 comments on commit 687a6e5

Please sign in to comment.