Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 71536d4

Browse files
committed
done
1 parent 273726a commit 71536d4

File tree

1 file changed

+4
-1
lines changed
  • local-cluster/tests/common

1 file changed

+4
-1
lines changed

local-cluster/tests/common/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ pub fn restore_tower(tower_path: &Path, node_pubkey: &Pubkey) -> Option<Tower> {
7979

8080
pub fn remove_tower(tower_path: &Path, node_pubkey: &Pubkey) {
8181
let file_tower_storage = FileTowerStorage::new(tower_path.to_path_buf());
82-
fs::remove_file(file_tower_storage.filename(node_pubkey)).unwrap();
82+
let filename = file_tower_storage.filename(node_pubkey);
83+
if filename.exists() {
84+
fs::remove_file(file_tower_storage.filename(node_pubkey)).unwrap();
85+
}
8386
}
8487

8588
pub fn open_blockstore(ledger_path: &Path) -> Blockstore {

0 commit comments

Comments
 (0)