about summary refs log tree commit diff
path: root/src/libstore/store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T16·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T16·36+0000
commitd822bf32e470e46a3634638fee3c4b1472d2cd26 (patch)
tree031d79cc5f4bd420d3a601ab8de923d351b59766 /src/libstore/store.cc
parentfa95f4be3f4df6ebe4d49ec57a66129f645e36c7 (diff)
* Close the database before the destructor runs.
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r--src/libstore/store.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 94c992f22936..e792fd28cedc 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -136,6 +136,13 @@ void initDB()
 }
 
 
+void closeDB()
+{
+    /* If the database isn't open, this is a NOP. */
+    nixDB.close();
+}
+
+
 void createStoreTransaction(Transaction & txn)
 {
     Transaction txn2(nixDB);