about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-06-23T13·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-06-23T13·27+0000
commit5f5cab0ac7c26783a4544feb31708d4f8e0f4a51 (patch)
tree1ac6bf79f849f385ed38b75377fab010880b8d70 /src/nix.cc
parent85effedca3e4cc3c10ccd835c9ea4fb712418cb9 (diff)
* A function to restore from a Nix archive.
* addValue() can now import any dumpable FS object.

Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix.cc b/src/nix.cc
index 8380abc20e37..de16ed9822d5 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -133,7 +133,8 @@ struct StdoutSink : DumpSink
         (const unsigned char * data, unsigned int len)
     {
         /* Don't use cout, it's slow as hell! */
-        write(STDOUT_FILENO, (char *) data, len);
+        if (write(STDOUT_FILENO, (char *) data, len) != len)
+            throw SysError("writing to stdout");
     }
 };