aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/daemon.cc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2020-09-18 10:06:34 +0200
committerRobert Hensing <robert@roberthensing.nl>2020-09-21 07:55:47 +0200
commit7c682640857106f18d7020c9c75ea39b1ef8dd2c (patch)
treee5283e3266b90ae1ed68caf19bf70f32403a45ba /src/libstore/daemon.cc
parentfbf509c1137fd59ebb3e7a993c8da42c17deb68a (diff)
wopAddToStore: add RepairFlag
Diffstat (limited to 'src/libstore/daemon.cc')
-rw-r--r--src/libstore/daemon.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index f2d789699..9f7350217 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -353,6 +353,9 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
auto name = readString(from);
auto camStr = readString(from);
auto refs = readStorePaths<StorePathSet>(*store, from);
+ bool repairBool;
+ from >> repairBool;
+ auto repair = RepairFlag{repairBool};
logger->startWork();
StorePath path = [&]() -> StorePath {
@@ -368,7 +371,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
[&](FixedOutputHashMethod &fohm) -> StorePath {
if (!refs.empty())
throw UnimplementedError("cannot yet have refs with flat or nar-hashed data");
- return store->addToStoreFromDump(source, name, fohm.fileIngestionMethod, fohm.hashType);
+ return store->addToStoreFromDump(source, name, fohm.fileIngestionMethod, fohm.hashType, repair);
},
}, contentAddressMethod);
}();