aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/daemon.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-05-15 17:13:45 +0200
committereldritch horrors <pennae@lix.systems>2024-07-11 20:37:27 +0000
commita5d431a9119c2560608768d9ec70fa37d5a6a985 (patch)
tree57a0b16585bb0070004cf45f537e1d87ba284960 /src/libstore/daemon.cc
parent03db4efab90b72c15cb5513debb3ad1563e70cf7 (diff)
libstore: turn copyNAR into a generator
Change-Id: Id452f6a03faa1037ff13af0f63e32883966ff40d
Diffstat (limited to 'src/libstore/daemon.cc')
-rw-r--r--src/libstore/daemon.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 52e8ab32e..f7b6a38a1 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -463,7 +463,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
command. (We don't trust `addToStoreFromDump` to not
eagerly consume the entire stream it's given, past the
length of the Nar. */
- copyNAR(from, saved);
+ saved << copyNAR(from);
} else {
/* Incrementally parse the NAR file, stripping the
metadata, and streaming the sole file we expect into
@@ -884,7 +884,6 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
else {
std::unique_ptr<Source> source;
- StringSink saved;
source = std::make_unique<TunnelSource>(from, to);
logger->startWork();