1
0
mirror of https://github.com/bvaisvil/zenith synced 2024-07-03 07:58:38 +00:00

show uid if no user name could be found

This commit is contained in:
Benjamin Vaisvil 2022-06-06 17:07:34 -05:00
parent 09a8bf4cc0
commit 48e2451709

View File

@ -517,7 +517,7 @@ impl CPUTimeApp {
.user_cache
.get_user_by_uid(process.uid)
.map(|user| user.name().to_string_lossy().to_string())
.unwrap_or_default();
.unwrap_or(format!("{:}", process.uid));
let zprocess = ZProcess::from_user_and_process(user_name, process);
self.threads_total += zprocess.threads_total as usize;
@ -530,7 +530,7 @@ impl CPUTimeApp {
.user_cache
.get_user_by_uid(process.uid)
.map(|user| user.name().to_string_lossy().to_string())
.unwrap_or_default();
.unwrap_or(format!("{:}", process.uid));
#[allow(unused_mut)]
let mut zprocess = ZProcess::from_user_and_process(user_name, process);
#[cfg(target_os = "linux")]