mirror of
https://github.com/mikedilger/chorus.git
synced 2026-07-02 07:13:21 +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
|
||||
pub fn new(config: &Config) -> Result<Store, Error> {
|
||||
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 events_are_aligned = lmdb.get_if_events_are_aligned()?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user