about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2017-12-06T12·11+0100
committerGitHub <noreply@github.com>2017-12-06T12·11+0100
commitba334bd6f756fa72686b72ed5da87ddc1a7aea69 (patch)
tree7925debcde02ab10316238399596062fe09acd98 /src/libstore
parent11a7f8ce14afbdc60b9acf424d941ccda1adc141 (diff)
parent2cb8aaa6109b4f5a31a1091dc3f56c8059a9c2c1 (diff)
Merge pull request #1714 from LnL7/fix-ssh-store-nar
ssh-store: fix length when writing nar
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/ssh-store.cc6
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;
     }
 };