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/nix/copy.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/nix') 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 -- cgit 1.4.1