diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 7a8a3f7de..fa6ade750 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -593,23 +593,19 @@ void copyStorePath(ref srcStore, ref dstStore, MyStringSink sink(progress); srcStore->narFromPath({storePath}, sink); - if (!info->narHash && !checkSigs) { + if (!info->narHash) { auto info2 = make_ref(*info); info2->narHash = hashString(htSHA256, *sink.s); if (!info->narSize) info2->narSize = sink.s->size(); info = info2; } - assert(info->narHash); - if (info->ultimate) { auto info2 = make_ref(*info); info2->ultimate = false; info = info2; } - assert(info->narHash); - dstStore->addToStore(*info, sink.s, repair, checkSigs); }