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

@ -222,7 +222,7 @@ pub fn archive_snapshot_package(snapshot_package: &AccountsPackage) -> Result<()
fs::create_dir_all(tar_dir)?;
// Create the staging directories
let staging_dir = TempDir::new()?;
let staging_dir = tempfile::tempdir_in(tar_dir)?;
let staging_accounts_dir = staging_dir.path().join(TAR_ACCOUNTS_DIR);
let staging_snapshots_dir = staging_dir.path().join(TAR_SNAPSHOTS_DIR);
let staging_version_file = staging_dir.path().join(TAR_VERSION_FILE);