about summary refs log tree commit diff
path: root/src/fstate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fstate.cc')
-rw-r--r--src/fstate.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fstate.cc b/src/fstate.cc
index 5da3d8358f74..2e2857ffc9f6 100644
--- a/src/fstate.cc
+++ b/src/fstate.cc
@@ -44,7 +44,10 @@ FSId writeTerm(ATerm t, const string & suffix, FSId id)
 //     debug(format("written term %1% = %2%") % (string) id %
 //         printTerm(t));
 
-    registerPath(path, id);
+    Transaction txn(nixDB);
+    registerPath(txn, path, id);
+    txn.commit();
+
     return id;
 }