Replaces fs-err in tiered storage (#34859)

This commit is contained in:
Brooks 2024-01-19 17:16:56 -05:00 committed by GitHub
parent 4a2871f384
commit 3916c31cb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -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(),
);
}
}
}