nar: 'write-file' can write to non-file ports.
authorLudovic Courtès <ludo@gnu.org>
Fri, 21 Feb 2014 16:37:55 +0000 (17:37 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 21 Feb 2014 22:49:52 +0000 (23:49 +0100)
commita93e91ff484005e05491621664ab71f888ad2ba2
treebc9e01f0b9bd52fc5c584f59e87b8ba78f6629cd
parent86d07a5514d859772980ef87e39f6e2b668655c0
nar: 'write-file' can write to non-file ports.

* guix/nar.scm (write-contents): Use 'sendfile' only when P is a file
  port.
* tests/nar.scm ("write-file supports non-file output ports"): New test.
guix/nar.scm
tests/nar.scm