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.
This commit is contained in:
steviez 2021-09-13 23:13:56 -04:00 committed by GitHub
parent 44c8b1bca2
commit 4fdd70c931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 {