1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 01:11:15 +02:00

Add a copyStorePath() utility function

This commit is contained in:
Eelco Dolstra 2016-05-03 14:45:50 +02:00
parent 80f739b571
commit dfebfc835f
5 changed files with 27 additions and 10 deletions

View file

@ -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 (...) {