1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

Move addToStoreFromDump to Store

This commit is contained in:
Eelco Dolstra 2018-09-25 18:55:37 +02:00
parent 05819d013f
commit 992a2ad475
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 9 additions and 5 deletions

View file

@ -316,10 +316,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
logger->startWork();
if (!savedRegular.regular) throw Error("regular file expected");
auto store2 = store.dynamic_pointer_cast<LocalStore>();
if (!store2) throw Error("operation is only supported by LocalStore");
Path path = store2->addToStoreFromDump(recursive ? *savedNAR.data : savedRegular.s, baseName, recursive, hashAlgo);
Path path = store->addToStoreFromDump(recursive ? *savedNAR.data : savedRegular.s, baseName, recursive, hashAlgo);
logger->stopWork();
to << path;