diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2017-12-06T12·11+0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06T12·11+0100 |
commit | ba334bd6f756fa72686b72ed5da87ddc1a7aea69 (patch) | |
tree | 7925debcde02ab10316238399596062fe09acd98 | |
parent | 11a7f8ce14afbdc60b9acf424d941ccda1adc141 (diff) | |
parent | 2cb8aaa6109b4f5a31a1091dc3f56c8059a9c2c1 (diff) |
Merge pull request #1714 from LnL7/fix-ssh-store-nar
ssh-store: fix length when writing nar
-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 bb536fadfd51..107c6e1ecb4d 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; } }; |