| 31 | |
| 32 | impl DirectJournalSink { |
| 33 | pub fn open(root: &std::path::Path) -> Result<Self, String> { |
| 34 | // Resolve (and merge, when a legacy layout is present) the merged |
| 35 | // database path — WITHOUT holding a handle. |
| 36 | let dot_dir = root.join(".atomic"); |
| 37 | let path = |
| 38 | atomic_repository::ensure_database(&dot_dir).map_err(|error| error.to_string())?; |
| 39 | Ok(Self { root: path }) |
| 40 | } |
| 41 | |
| 42 | fn store(&self) -> Result<atomic_repository::redb_change_store::RedbChangeStore, String> { |
| 43 | atomic_repository::redb_change_store::RedbChangeStore::open_existing_wait( |