Consistently create temp dirs under ledger/farf (#10848)

This commit is contained in:
Ryo Onodera
2020-07-01 11:38:59 +09:00
committed by GitHub
parent 5adf6f6bde
commit b89e506cbb
5 changed files with 16 additions and 7 deletions

View File

@ -2700,7 +2700,7 @@ pub fn create_new_ledger(
// ensure the genesis archive can be unpacked and it is under
// max_genesis_archive_unpacked_size, immediately after creating it above.
{
let temp_dir = tempfile::TempDir::new().unwrap();
let temp_dir = tempfile::tempdir_in(ledger_path).unwrap();
// unpack into a temp dir, while completely discarding the unpacked files
let unpack_check = unpack_genesis_archive(
&archive_path,