From af3e7d7551f8f264e7330012fb4dd8ed558c0127 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 16 Dec 2018 13:52:16 +0100 Subject: [PATCH] fix chunk store file paths --- src/backup/chunk_store.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backup/chunk_store.rs b/src/backup/chunk_store.rs index 7f76fe11..009ee2cb 100644 --- a/src/backup/chunk_store.rs +++ b/src/backup/chunk_store.rs @@ -117,7 +117,7 @@ impl ChunkStore { // create 4096 subdir for i in 0..4096 { - let mut l1path = base.clone(); + let mut l1path = chunk_dir.clone(); l1path.push(format!("{:03x}",i)); if let Err(err) = std::fs::create_dir(&l1path) { bail!("unable to create chunk subdir {:?} - {}", l1path, err); @@ -160,7 +160,7 @@ impl ChunkStore { self.hasher.result(&mut digest); //println!("DIGEST {}", u256_to_hex(&digest)); - let mut chunk_path = self.base.clone(); + let mut chunk_path = self.chunk_dir.clone(); let prefix = u256_to_prefix(&digest); chunk_path.push(&prefix); let digest_str = u256_to_hex(&digest); @@ -176,7 +176,7 @@ impl ChunkStore { } } - let mut chunk_dir = self.base.clone(); + let mut chunk_dir = self.chunk_dir.clone(); chunk_dir.push(&prefix); if let Err(_) = std::fs::create_dir(&chunk_dir) { /* ignore */ }