fix snapshot dir already exists

This commit is contained in:
mpostma 2021-03-23 17:23:57 +01:00
parent eb53ed4cc1
commit 48d5f88c1a
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,6 @@
pub mod search;
mod updates;
use std::fs::create_dir_all;
use std::ops::Deref;
use std::sync::Arc;
@ -59,7 +58,6 @@ impl Data {
pub fn new(options: Opt) -> anyhow::Result<Data> {
let path = options.db_path.clone();
create_dir_all(&path)?;
let index_controller = IndexController::new(&path, &options)?;
let mut api_keys = ApiKeys {

View File

@ -80,6 +80,8 @@ impl IndexController {
)?;
}
std::fs::create_dir_all(&path)?;
let uuid_resolver = uuid_resolver::UuidResolverHandleImpl::new(&path)?;
let index_handle = index_actor::IndexActorHandleImpl::new(&path, index_size)?;
let update_handle = update_actor::UpdateActorHandleImpl::new(