about summary refs log tree commit diff
path: root/src/nix/copy.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/nix/copy.cc
parent80f739b571771b56b9930fbf1ca3e3a4128b46cb (diff)
Add a copyStorePath() utility function
Diffstat (limited to 'src/nix/copy.cc')
-rw-r--r--src/nix/copy.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nix/copy.cc b/src/nix/copy.cc
index be51fee62712..de306cbf91d9 100644
--- a/src/nix/copy.cc
+++ b/src/nix/copy.cc
@@ -65,11 +65,7 @@ struct CmdCopy : StorePathsCommand
                 if (!dstStore->isValidPath(storePath)) {
                     Activity act(*logger, lvlInfo, format("copying ‘%s’...") % storePath);
 
-                    StringSink sink;
-                    srcStore->exportPaths({storePath}, false, sink);
-
-                    StringSource source(*sink.s);
-                    dstStore->importPaths(false, source, 0);
+                    copyStorePath(srcStore, dstStore, storePath);
 
                     logger->incProgress(copiedLabel);
                 } else