From 2ac95a3ebc07317101162cf76678b05aa730d704 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 13:43:55 +0000 Subject: [PATCH] Print original error from accounts dir remove (#15458) (#15466) (cherry picked from commit 5ccaa6336acb1411cfb47f02cbc1b8c4466018dd) Co-authored-by: Ryo Onodera --- core/src/validator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 933a85489e..bb71471265 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -1383,10 +1383,10 @@ fn get_stake_percent_in_gossip(bank: &Bank, cluster_info: &ClusterInfo, log: boo // Cleanup anything that looks like an accounts append-vec fn cleanup_accounts_path(account_path: &std::path::Path) { - if std::fs::remove_dir_all(account_path).is_err() { + if let Err(e) = std::fs::remove_dir_all(account_path) { warn!( - "encountered error removing accounts path: {:?}", - account_path + "encountered error removing accounts path: {:?}: {}", + account_path, e ); } }