mirror of
https://github.com/mikedilger/chorus.git
synced 2026-11-19 15:24:25 +00:00
Create lmdb subdir if missing
This commit is contained in:
1 parent
38a20d0a78
commit
d70d4b0852
1 file changed
+4
@@ -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()?;
|
||||
|
||||
Reference in new issue
Block a user