From 4fdd70c931cfe944077c21ac6b0cbc803ff97a49 Mon Sep 17 00:00:00 2001 From: steviez Date: Mon, 13 Sep 2021 23:13:56 -0400 Subject: [PATCH] Properly clean temp files in Blockstore::create_new_ledger() (#19589) Use TempDir::path() instead of TempDir::into_path(); into_path() returns the underlying PathBuf and voids the promise to delete the directory when TempDir goes out of scope. --- ledger/src/blockstore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 09d96fa205..f385c1b65b 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -3737,7 +3737,7 @@ pub fn create_new_ledger( // unpack into a temp dir, while completely discarding the unpacked files let unpack_check = unpack_genesis_archive( &archive_path, - &temp_dir.into_path(), + temp_dir.path(), max_genesis_archive_unpacked_size, ); if let Err(unpack_err) = unpack_check {