about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-12-01T13·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-12-01T13·51+0000
commit23c38a04ccba4469b9aa98167532c236beeee0a0 (patch)
tree49e2bb12c15acf7a9e54efe7a3e283afcc1c870b /src
parent24f863d86b0316c736fe9e89998cd442b8a400dd (diff)
* Slight improvement.
Diffstat (limited to 'src')
-rw-r--r--src/nix-worker/nix-worker.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index d74b82df4c23..8950f73ef25f 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -364,12 +364,11 @@ static void performOp(unsigned int clientVersion,
                addToStoreFromDump(). */
             ParseSink sink; /* null sink; just parse the NAR */
             parseDump(sink, savedNAR);
-        } else {
+        } else
             parseDump(savedRegular, from);
-            if (!savedRegular.regular) throw Error("regular file expected");
-        }
             
         startWork();
+        if (!savedRegular.regular) throw Error("regular file expected");
         Path path = dynamic_cast<LocalStore *>(store.get())
             ->addToStoreFromDump(recursive ? savedNAR.s : savedRegular.s, baseName, recursive, hashAlgo);
         stopWork();