From 6ef6ef65889c942c6e23a251726d0b0e0e288d8c Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 25 Aug 2023 22:04:17 -0700 Subject: [PATCH] more fine-tune logging --- status_cloud/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/status_cloud/src/main.rs b/status_cloud/src/main.rs index c8225c6..754d993 100644 --- a/status_cloud/src/main.rs +++ b/status_cloud/src/main.rs @@ -37,7 +37,13 @@ fn main() -> Result<(), Box> { let mut drives: Vec = vec![]; { - let rust_drives = std::fs::read_dir("/dev/").unwrap(); + let rust_drives = match std::fs::read_dir("/dev/") { + Ok(val) => val, + Err(e) => { + println!("Error opening /dev/: {}", e.to_string()); + return Ok(()); + } + }; for path in rust_drives { match path {