mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 07:36:53 +00:00
fix check file not found use is_err_object_not_found
This commit is contained in:
@@ -60,8 +60,13 @@ impl ObjectStore {
|
||||
|
||||
match items {
|
||||
Ok(items) => Result::<_, crate::Error>::Ok(items.prefixes),
|
||||
Err(e) if is_not_found(&e) => Result::<_, crate::Error>::Ok(vec![]),
|
||||
Err(e) => Err(Error::StringError(format!("list {prefix} failed, err: {e:?}"))),
|
||||
Err(e) => {
|
||||
if is_not_found(&e) {
|
||||
Result::<_, crate::Error>::Ok(vec![])
|
||||
} else {
|
||||
Err(Error::StringError(format!("list {prefix} failed, err: {e:?}")))
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user