Replaces fs-err in tiered storage (#34859)
This commit is contained in:
parent
4a2871f384
commit
3916c31cb4
|
@ -26,7 +26,7 @@ use {
|
|||
solana_sdk::account::ReadableAccount,
|
||||
std::{
|
||||
borrow::Borrow,
|
||||
fs::OpenOptions,
|
||||
fs::{self, OpenOptions},
|
||||
path::{Path, PathBuf},
|
||||
sync::OnceLock,
|
||||
},
|
||||
|
@ -54,8 +54,11 @@ pub struct TieredStorage {
|
|||
|
||||
impl Drop for TieredStorage {
|
||||
fn drop(&mut self) {
|
||||
if let Err(err) = fs_err::remove_file(&self.path) {
|
||||
panic!("TieredStorage failed to remove backing storage file: {err}");
|
||||
if let Err(err) = fs::remove_file(&self.path) {
|
||||
panic!(
|
||||
"TieredStorage failed to remove backing storage file '{}': {err}",
|
||||
self.path.display(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue