Fail fast if account paths cannot be canonicalized (#7300)

* Canonicalize account paths to avoid symlink issues

* fixes
This commit is contained in:
Justin Starry
2019-12-05 21:41:29 -05:00
committed by GitHub
parent 7c3be2ec9a
commit b7d4330dd4
13 changed files with 123 additions and 125 deletions

View File

@@ -195,7 +195,7 @@ pub fn bank_slot_from_archive<P: AsRef<Path>>(snapshot_tar: P) -> Result<u64> {
}
pub fn bank_from_archive<P: AsRef<Path>>(
account_paths: String,
account_paths: &[PathBuf],
snapshot_path: &PathBuf,
snapshot_tar: P,
) -> Result<Bank> {
@@ -254,7 +254,7 @@ pub fn untar_snapshot_in<P: AsRef<Path>, Q: AsRef<Path>>(
}
fn rebuild_bank_from_snapshots<P>(
local_account_paths: String,
local_account_paths: &[PathBuf],
unpacked_snapshots_dir: &PathBuf,
append_vecs_path: P,
) -> Result<Bank>