aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/path.cc')
-rw-r--r--src/libfetchers/path.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libfetchers/path.cc b/src/libfetchers/path.cc
index 11c952dc2..8e47616d0 100644
--- a/src/libfetchers/path.cc
+++ b/src/libfetchers/path.cc
@@ -130,10 +130,8 @@ struct PathInputScheme : InputScheme
time_t mtime = 0;
if (!storePath || storePath->name() != "source" || !store->isValidPath(*storePath)) {
// FIXME: try to substitute storePath.
- auto src = sinkToSource([&](Sink & sink) {
- mtime = dumpPathAndGetMtime(absPath, sink, defaultPathFilter);
- });
- storePath = store->addToStoreFromDump(*src, "source");
+ auto src = GeneratorSource{dumpPathAndGetMtime(absPath, mtime, defaultPathFilter)};
+ storePath = store->addToStoreFromDump(src, "source");
}
input.attrs.insert_or_assign("lastModified", uint64_t(mtime));