diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-12-06 11:35:24 +0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-12-06 11:41:08 +0100 |
commit | 2cb8aaa6109b4f5a31a1091dc3f56c8059a9c2c1 (patch) | |
tree | 7925debcde02ab10316238399596062fe09acd98 /src | |
parent | 11a7f8ce14afbdc60b9acf424d941ccda1adc141 (diff) |
ssh-store: fix length when writing nar
This fixes nix copy and other things that use copyStorePath.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/ssh-store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc index bb536fadf..107c6e1ec 100644 --- a/src/libstore/ssh-store.cc +++ b/src/libstore/ssh-store.cc @@ -62,9 +62,9 @@ public: ForwardSource(Source & readSource, Sink & writeSink) : readSource(readSource), writeSink(writeSink) {} size_t read(unsigned char * data, size_t len) override { - auto res = readSource.read(data, len); - writeSink(data, len); - return res; + auto n = readSource.read(data, len); + writeSink(data, n); + return n; } }; |