fix:#355 multi pools select error

This commit is contained in:
weisd
2025-04-25 09:54:41 +08:00
parent 7dae5f8ab7
commit 9fc4bb919e
8 changed files with 275 additions and 16 deletions
+4
View File
@@ -364,6 +364,10 @@ pub fn is_unformatted_disk(err: &Error) -> bool {
}
pub fn is_err_file_not_found(err: &Error) -> bool {
if let Some(ioerr) = err.downcast_ref::<io::Error>() {
return ioerr.kind() == ErrorKind::NotFound;
}
matches!(err.downcast_ref::<DiskError>(), Some(DiskError::FileNotFound))
}