mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Fix bug for devices and apparent size
If apparent_size was set and ignore files on other devices was set then the latter flat would not work. Fix this bug
This commit is contained in:
+13
-11
@@ -173,17 +173,19 @@ fn should_ignore_file(
|
||||
inodes: &mut HashSet<(u64, u64)>,
|
||||
maybe_inode: Option<(u64, u64)>,
|
||||
) -> bool {
|
||||
if !apparent_size {
|
||||
if let Some(inode_dev_pair) = maybe_inode {
|
||||
// Ignore files on different devices (if flag applied)
|
||||
if restricted_filesystems.is_some()
|
||||
&& !restricted_filesystems
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.contains(&inode_dev_pair.1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if let Some(inode_dev_pair) = maybe_inode {
|
||||
// Ignore files on different devices (if flag applied)
|
||||
if restricted_filesystems.is_some()
|
||||
&& !restricted_filesystems
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.contains(&inode_dev_pair.1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if !apparent_size {
|
||||
// Ignore files already visited or symlinked
|
||||
if inodes.contains(&inode_dev_pair) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user