diff --git a/src/tree/node/mod.rs b/src/tree/node/mod.rs index b010469..a74270c 100644 --- a/src/tree/node/mod.rs +++ b/src/tree/node/mod.rs @@ -272,7 +272,9 @@ impl TryFrom<(DirEntry, &Context)> for Node { let inode = Inode::try_from(&metadata).ok(); #[cfg(unix)] - let unix_attrs = if ctx.long { + let unix_attrs = if ctx.long + && path.components().count() <= ctx.dir_canonical().components().count().saturating_add(ctx.level()) + { unix::Attrs::from((&metadata, &dir_entry)) } else { unix::Attrs::default()