mirror of
https://github.com/mikedilger/chorus.git
synced 2026-08-31 07:31:01 +00:00
Create lmdb subdir if missing
This commit is contained in:
parent
38a20d0a78
commit
d70d4b0852
@ -24,6 +24,10 @@ impl Store {
|
|||||||
/// Setup persistent storage
|
/// Setup persistent storage
|
||||||
pub fn new(config: &Config) -> Result<Store, Error> {
|
pub fn new(config: &Config) -> Result<Store, Error> {
|
||||||
let dir = format!("{}/lmdb", &config.data_directory);
|
let dir = format!("{}/lmdb", &config.data_directory);
|
||||||
|
|
||||||
|
// Create the lmdb subdir if it doesn't exist, ignoring errors
|
||||||
|
let _ = std::fs::create_dir(&dir);
|
||||||
|
|
||||||
let lmdb = Lmdb::new(&dir)?;
|
let lmdb = Lmdb::new(&dir)?;
|
||||||
|
|
||||||
let events_are_aligned = lmdb.get_if_events_are_aligned()?;
|
let events_are_aligned = lmdb.get_if_events_are_aligned()?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user