Merge pull request #1714 from LnL7/fix-ssh-store-nar

ssh-store: fix length when writing nar
This commit is contained in:
Eelco Dolstra 2017-12-06 13:11:36 +01:00 committed by GitHub
commit ba334bd6f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,9 +62,9 @@ public:
ForwardSource(Source & readSource, Sink & writeSink) : readSource(readSource), writeSink(writeSink) {} ForwardSource(Source & readSource, Sink & writeSink) : readSource(readSource), writeSink(writeSink) {}
size_t read(unsigned char * data, size_t len) override size_t read(unsigned char * data, size_t len) override
{ {
auto res = readSource.read(data, len); auto n = readSource.read(data, len);
writeSink(data, len); writeSink(data, n);
return res; return n;
} }
}; };