From dfebfc835f7b8156a559314bcd1ecff739c14fd1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 May 2016 14:45:50 +0200 Subject: Add a copyStorePath() utility function --- src/libstore/build.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 65df2eea59a0..3b9ecab1c12a 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -3222,11 +3222,7 @@ void SubstitutionGoal::tryToRun() /* Wake up the worker loop when we're done. */ Finally updateStats([this]() { outPipe.writeSide.close(); }); - StringSink sink; - sub->exportPaths({storePath}, false, sink); - - StringSource source(*sink.s); - worker.store.importPaths(false, source, 0); + copyStorePath(ref(sub), ref(worker.store.shared_from_this()), storePath); promise.set_value(); } catch (...) { -- cgit 1.4.1