From 87f0bdea9e34e7f93ad6455b195ee6314c407707 Mon Sep 17 00:00:00 2001 From: Ben S Date: Thu, 22 May 2014 01:18:39 +0100 Subject: [PATCH] Print numeric UIDs and GIDs if they don't map to anything --- file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.rs b/file.rs index 6db7206..12ea552 100644 --- a/file.rs +++ b/file.rs @@ -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()), } }