Skip to content

Commit

Permalink
Replaces fs-err in remove_tmp_snapshot_archives() (solana-labs#34839)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jan 18, 2024
1 parent 10590a3 commit 3388507
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,15 @@ pub fn remove_tmp_snapshot_archives(snapshot_archives_dir: impl AsRef<Path>) {
{
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(),
);
}
}
}
Expand Down

0 comments on commit 3388507

Please sign in to comment.