Bug fix for get_disks()

In rare circumstances we could be omitting drives from the list
This commit is contained in:
2Shirt 2025-04-21 00:13:04 -07:00
parent 0a00e970aa
commit 15b5d5e131
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -286,7 +286,7 @@ pub fn get_disks() -> Vec<Disk> {
contents = String::from_utf8_lossy(&output.stdout).to_string();
if let Some(return_code) = output.status.code() {
let disk_nums = parse_disk_numbers(&contents);
if return_code != 0 && !disk_nums.is_empty() {
if return_code != 0 && !disk_nums.is_empty() && disk_nums.len() != DEFAULT_MAX_DISKS {
// The base assumptions were correct! skipping fallback method
//
// Since the return_code was not zero, and at least one disk was detected, that