diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index 9f9a9e728..954b25070 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -325,7 +325,7 @@ std::pair InputScheme::fetch(ref store, const Input & i { auto [accessor, input2] = lazyFetch(store, input); - auto source = sinkToSource([&](Sink & sink) { + auto source = sinkToSource([&, accessor{accessor}](Sink & sink) { accessor->dumpPath(CanonPath::root, sink); });