about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-03-22T18·57+0100
committerLluís Batlle i Rossell <viric@viric.name>2012-03-22T18·57+0100
commit25de80e2b61208850c4a39d8ee44967ada8f040e (patch)
tree8117bda070db824b33c27b3766d12766e45dbe9a
parent19d9762ad5fc8d8db3e9a545a89309f08572cc9f (diff)
Adding a nix option to sync before registering a path, for non-ext*
filesystems.
-rw-r--r--src/libstore/local-store.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index f3b779dd05f3..950e6e7608f1 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -968,6 +968,8 @@ void LocalStore::registerValidPath(const ValidPathInfo & info)
 
 void LocalStore::registerValidPaths(const ValidPathInfos & infos)
 {
+    if (queryBoolSetting("sync-before-registering", true))
+        sync();
     while (1) {
         try {
             SQLiteTxn txn(db);