Bug fix for get_disks()
In rare circumstances we could be omitting drives from the list
This commit is contained in:
parent
0a00e970aa
commit
15b5d5e131
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ pub fn get_disks() -> Vec<Disk> {
|
||||||
contents = String::from_utf8_lossy(&output.stdout).to_string();
|
contents = String::from_utf8_lossy(&output.stdout).to_string();
|
||||||
if let Some(return_code) = output.status.code() {
|
if let Some(return_code) = output.status.code() {
|
||||||
let disk_nums = parse_disk_numbers(&contents);
|
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
|
// The base assumptions were correct! skipping fallback method
|
||||||
//
|
//
|
||||||
// Since the return_code was not zero, and at least one disk was detected, that
|
// Since the return_code was not zero, and at least one disk was detected, that
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue