about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index c69b9de506d6..b7bce20bd412 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -625,8 +625,12 @@ static void processConnection()
             throw Error("if you run `nix-worker' as root, then you MUST set `build-users-group'!");
 #endif
 
+        bool reserveSpace = true;
+        if (GET_PROTOCOL_MINOR(clientVersion) >= 11)
+            reserveSpace = readInt(from) != 0;
+
         /* Open the store. */
-        store = boost::shared_ptr<StoreAPI>(new LocalStore());
+        store = boost::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
 
         stopWork();
         to.flush();