From 5f5cab0ac7c26783a4544feb31708d4f8e0f4a51 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 23 Jun 2003 13:27:59 +0000 Subject: * A function to restore from a Nix archive. * addValue() can now import any dumpable FS object. --- src/nix.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nix.cc') 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"); } }; -- cgit 1.4.1