Add a copyStorePath() utility function
This commit is contained in:
parent
80f739b571
commit
dfebfc835f
5 changed files with 27 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue