aboutsummaryrefslogtreecommitdiffstats
path: root/store/store-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'store/store-tree.c')
-rw-r--r--store/store-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/store-tree.c b/store/store-tree.c
index ecdced6..3404edd 100644
--- a/store/store-tree.c
+++ b/store/store-tree.c
@@ -1202,7 +1202,7 @@ static PureResult publish(Session *session, Writer *writer, size_t count, const
written = find(&session->tree, catalog, keys[i], &index, &found, &current, &stored) &&
rebuild(&session->tree, catalog, index * RECORD, found ? RECORD : 0,
(PureSpan){record, RECORD}, &updated);
- catalog = updated;
+ if (written) catalog = updated;
}
written = written && write_root(&session->tree, writer, &catalog, false) && flush(writer);
/* Unpublished bytes stay in the tail; the next commit overwrites them. */