From 3388507878541d0c51a8c44c364723bd39e92d0d Mon Sep 17 00:00:00 2001 From: Brooks Date: Thu, 18 Jan 2024 17:40:45 -0500 Subject: [PATCH] Replaces fs-err in remove_tmp_snapshot_archives() (#34839) --- runtime/src/snapshot_utils.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index b267dde03a2194..e0a0d946dbe010 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -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(), + ); } } }