From 3916c31cb47136fb4deb9a0262fc43666e71c906 Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 19 Jan 2024 17:16:56 -0500 Subject: [PATCH] Replaces fs-err in tiered storage (#34859) --- accounts-db/src/tiered_storage.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/accounts-db/src/tiered_storage.rs b/accounts-db/src/tiered_storage.rs index ced4433895ec0d..a6a8dc5fb0471e 100644 --- a/accounts-db/src/tiered_storage.rs +++ b/accounts-db/src/tiered_storage.rs @@ -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(), + ); } } }