fix user name displayed in place of user name
@@ -50,7 +50,7 @@ impl TreeView<'_> {
if let Some(user) = users_cache.get_user_by_uid(line.uid) {
max_user_name_len = max_user_name_len.max(user.name().to_string_lossy().len());
}
- if let Some(group) = users_cache.get_group_by_gid(line.uid) {
+ if let Some(group) = users_cache.get_group_by_gid(line.gid) {
max_group_name_len =
max_group_name_len.max(group.name().to_string_lossy().len());
}
@@ -109,7 +109,7 @@ impl TreeView<'_> {
w = max_user_name_len,
)?;
}
- if let Some(group) = users_cache.get_group_by_gid(line.uid) {
+ if let Some(group) = users_cache.get_group_by_gid(line.gid) {
write!(
self.out,
" {:w$} ",
