mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 15:46:53 +00:00
fix check file not found use is_err_object_not_found
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{disk, error::Error};
|
||||
use crate::{disk, error::Error, store_err::is_err_object_not_found};
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum ConfigError {
|
||||
@@ -20,6 +20,8 @@ pub fn is_not_found(err: &Error) -> bool {
|
||||
ConfigError::is_not_found(e)
|
||||
} else if let Some(e) = err.downcast_ref::<disk::error::DiskError>() {
|
||||
matches!(e, disk::error::DiskError::FileNotFound)
|
||||
} else if is_err_object_not_found(err) {
|
||||
return true;
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user