提交 87f0bdea 编写于 作者: B Ben S

Print numeric UIDs and GIDs if they don't map to anything

上级 a0582132
......@@ -40,8 +40,8 @@ impl<'a> File<'a> {
Permissions => self.permissions(),
FileName => self.file_colour().paint(self.name.to_owned()),
FileSize(si) => self.file_size(si),
User => get_user_name(self.stat.unstable.uid as i32).expect("???"),
Group => get_group_name(self.stat.unstable.gid as u32).expect("???"),
User => get_user_name(self.stat.unstable.uid as i32).unwrap_or(self.stat.unstable.uid.to_str()),
Group => get_group_name(self.stat.unstable.gid as u32).unwrap_or(self.stat.unstable.gid.to_str()),
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册