fixed blooms dir creation (#8941)

This commit is contained in:
Svyatoslav Nikolsky 2018-06-22 11:52:01 +03:00 committed by Marek Kotewicz
parent 31b4437b93
commit 6be5744be4
2 changed files with 4 additions and 4 deletions

View File

@ -331,8 +331,8 @@ pub fn restoration_db_handler(config: kvdb_rocksdb::DatabaseConfig) -> Box<Block
let key_value = Arc::new(kvdb_rocksdb::Database::open(&self.config, &db_path.to_string_lossy())?); let key_value = Arc::new(kvdb_rocksdb::Database::open(&self.config, &db_path.to_string_lossy())?);
let blooms_path = db_path.join("blooms"); let blooms_path = db_path.join("blooms");
let trace_blooms_path = db_path.join("trace_blooms"); let trace_blooms_path = db_path.join("trace_blooms");
fs::create_dir(&blooms_path)?; fs::create_dir_all(&blooms_path)?;
fs::create_dir(&trace_blooms_path)?; fs::create_dir_all(&trace_blooms_path)?;
let blooms = blooms_db::Database::open(blooms_path).unwrap(); let blooms = blooms_db::Database::open(blooms_path).unwrap();
let trace_blooms = blooms_db::Database::open(trace_blooms_path).unwrap(); let trace_blooms = blooms_db::Database::open(trace_blooms_path).unwrap();
let db = RestorationDB { let db = RestorationDB {

View File

@ -105,8 +105,8 @@ pub fn open_database(client_path: &str, config: &DatabaseConfig) -> Result<Arc<B
let blooms_path = path.join("blooms"); let blooms_path = path.join("blooms");
let trace_blooms_path = path.join("trace_blooms"); let trace_blooms_path = path.join("trace_blooms");
fs::create_dir(&blooms_path)?; fs::create_dir_all(&blooms_path)?;
fs::create_dir(&trace_blooms_path)?; fs::create_dir_all(&trace_blooms_path)?;
let db = AppDB { let db = AppDB {
key_value: Arc::new(Database::open(&config, client_path)?), key_value: Arc::new(Database::open(&config, client_path)?),