Adding a nix option to sync before registering a path, for non-ext*

filesystems.
This commit is contained in:
Lluís Batlle i Rossell 2012-03-22 19:57:42 +01:00
parent 19d9762ad5
commit 25de80e2b6

View file

@ -968,6 +968,8 @@ void LocalStore::registerValidPath(const ValidPathInfo & info)
void LocalStore::registerValidPaths(const ValidPathInfos & infos) void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{ {
if (queryBoolSetting("sync-before-registering", true))
sync();
while (1) { while (1) {
try { try {
SQLiteTxn txn(db); SQLiteTxn txn(db);