diff options
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index c6cc46c6096d..8600def627fa 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -363,10 +363,9 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore, auto info = srcStore->queryPathInfo(storePath); StringSink sink; - srcStore->exportPaths({storePath}, sink); + srcStore->narFromPath({storePath}, sink); - StringSource source(*sink.s); - dstStore->importPaths(source, 0); + dstStore->addToStore(*info, *sink.s); } @@ -406,16 +405,6 @@ string showPaths(const PathSet & paths) } -void Store::exportPaths(const Paths & paths, Sink & sink) -{ - for (auto & i : paths) { - sink << 1; - exportPath(i, sink); - } - sink << 0; -} - - std::string ValidPathInfo::fingerprint() const { if (narSize == 0 || !narHash) |