Apparent size mode: handle hard links.

If we are viewing apparent size then each hard linked file should be
counted. Not just the first one.
This commit is contained in:
bootandy
2018-03-22 14:36:17 -04:00
parent cce656ab4c
commit 4944d517f4

View File

@@ -56,11 +56,13 @@ fn examine_dir(
match (file_type, maybe_size_and_inode) {
(Some(file_type), Some((size, inode))) => {
let s = d.path().to_string_lossy().to_string();
if let Some(inode_dev_pair) = inode {
if inodes.contains(&inode_dev_pair) {
continue;
if !apparent_size {
if let Some(inode_dev_pair) = inode {
if inodes.contains(&inode_dev_pair) {
continue;
}
inodes.insert(inode_dev_pair);
}
inodes.insert(inode_dev_pair);
}
if d.path().is_dir() && !file_type.is_symlink() {