aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
Diffstat (limited to 'import')
-rw-r--r--import/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs
index bf3c48d..fd555b7 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -139,11 +139,13 @@ pub fn generate_node_paths(db: &DataAcid) -> anyhow::Result<()> {
fn traverse(db: &DataAcid, c: String, mut path: Vec<String>) -> anyhow::Result<()> {
let node = {
let txn = db.inner.begin_write()?;
- let table = txn.open_table(T_NODE)?;
+ let mut table = txn.open_table(T_NODE)?;
let mut node = table
.get(&*c)?
- .ok_or(anyhow!("missing child when generating paths: {c:?} at {path:?}"))?
+ .ok_or(anyhow!(
+ "missing child when generating paths: {c:?} at {path:?}"
+ ))?
.value()
.0;
@@ -151,6 +153,8 @@ pub fn generate_node_paths(db: &DataAcid) -> anyhow::Result<()> {
node.public.path = path.clone();
}
+ table.insert(c.as_str(), Ser(node.clone()))?;
+
drop(table);
txn.commit()?;
node