diff options
Diffstat (limited to 'src/libstore/ssh-store.cc')
-rw-r--r-- | src/libstore/ssh-store.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc index 398408ea8d78..39205ae2ce12 100644 --- a/src/libstore/ssh-store.cc +++ b/src/libstore/ssh-store.cc @@ -63,29 +63,12 @@ private: }; }; - -class ForwardSource : public Source -{ - Source & readSource; - Sink & writeSink; -public: - ForwardSource(Source & readSource, Sink & writeSink) : readSource(readSource), writeSink(writeSink) {} - size_t read(unsigned char * data, size_t len) override - { - auto n = readSource.read(data, len); - writeSink(data, n); - return n; - } -}; - void SSHStore::narFromPath(const Path & path, Sink & sink) { auto conn(connections->get()); conn->to << wopNarFromPath << path; conn->processStderr(); - ParseSink ps; - auto fwd = ForwardSource(conn->from, sink); - parseDump(ps, fwd); + copyNAR(conn->from, sink); } ref<FSAccessor> SSHStore::getFSAccessor() |