diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index cc12666318ebf0..a8f0c3d3a8315e 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -30,7 +30,7 @@ use { std::{ cmp::Ordering, collections::{HashMap, HashSet}, - fmt, + fmt, fs, io::{BufReader, BufWriter, Error as IoError, ErrorKind, Read, Seek, Write}, num::NonZeroUsize, path::{Path, PathBuf}, @@ -641,12 +641,15 @@ pub fn remove_tmp_snapshot_archives(snapshot_archives_dir: impl AsRef) { { let path = entry.path(); let result = if path.is_dir() { - fs_err::remove_dir_all(path) + fs::remove_dir_all(&path) } else { - fs_err::remove_file(path) + fs::remove_file(&path) }; if let Err(err) = result { - warn!("Failed to remove temporary snapshot archive: {err}"); + warn!( + "Failed to remove temporary snapshot archive '{}': {err}", + path.display(), + ); } } }