Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/libstore/binary-cache-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,8 @@ ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon(
void BinaryCacheStore::addToStore(
const ValidPathInfo & info, Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs)
{
if (!repair && isValidPath(info.path)) {
// FIXME: copyNAR -> null sink
narSource.drain();
if (!repair && isValidPath(info.path))
return;
}

addToStoreCommon(narSource, repair, checkSigs, {[&](HashResult nar) {
/* FIXME reinstate these, once we can correctly do hash modulo sink as
Expand Down Expand Up @@ -425,10 +422,7 @@ void BinaryCacheStore::addMultipleToStore(
lock held by LegacySSHStore::narFromPath(). */
auto source = std::move(source_);

if (!repair && isValidPath(info.path)) {
// FIXME: copyNAR -> null sink
source->drain();
} else {
if (repair || !isValidPath(info.path)) {
MaintainCount<decltype(nrRunning)> mc(nrRunning);
showProgress();
auto narInfo = uploadData(*source, repair, [&](HashResult nar) {
Expand Down
Loading