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:
parent
44c8b1bca2
commit
4fdd70c931
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue