mirror of
https://github.com/bootandy/dust.git
synced 2025-12-15 09:00:50 -08:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user