about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-03T12·45+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04T09·01+0200
commitdfebfc835f7b8156a559314bcd1ecff739c14fd1 (patch)
tree94843083056eabd89f3892e71f4cc6173b1189d8 /src/libstore/build.cc
parent80f739b571771b56b9930fbf1ca3e3a4128b46cb (diff)
Add a copyStorePath() utility function
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 1 insertions, 5 deletions
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<Store>(sub), ref<Store>(worker.store.shared_from_this()), storePath);
 
             promise.set_value();
         } catch (...) {