Skip to content

Commit

Permalink
Replaces fs-err in tiered storage (solana-labs#34859)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jan 19, 2024
1 parent 4a2871f commit 3916c31
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions accounts-db/src/tiered_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use {
solana_sdk::account::ReadableAccount,
std::{
borrow::Borrow,
fs::OpenOptions,
fs::{self, OpenOptions},
path::{Path, PathBuf},
sync::OnceLock,
},
Expand Down Expand Up @@ -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(),
);
}
}
}
Expand Down

0 comments on commit 3916c31

Please sign in to comment.