aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/tarball.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-05-29 16:19:48 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-05-29 17:02:32 -0400
commitfac0c2d54a6b04175b40009506f2720d2594ed4e (patch)
treeef6ef3e0fee28a0a300e7e1197da1a5596c5a341 /src/libfetchers/tarball.cc
parentf60ce4fa207a210e23a1142d3a8ead611526e6e1 (diff)
Remove addToStore variant as requested by `FIXME`
The idea is it's always more flexible to consumer a `Source` than a plain string, and it might even reduce memory consumption. I also looked at `addToStoreFromDump` with its `// FIXME: remove?`, but the worked needed for that is far more up for interpretation, so I punted for now.
Diffstat (limited to 'src/libfetchers/tarball.cc')
-rw-r--r--src/libfetchers/tarball.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc
index bf2b2a5ff..b6e57379b 100644
--- a/src/libfetchers/tarball.cc
+++ b/src/libfetchers/tarball.cc
@@ -71,7 +71,8 @@ DownloadFileResult downloadFile(
info.narHash = hashString(htSHA256, *sink.s);
info.narSize = sink.s->size();
info.ca = makeFixedOutputCA(FileIngestionMethod::Flat, hash);
- store->addToStore(info, sink.s, NoRepair, NoCheckSigs);
+ auto source = StringSource { *sink.s };
+ store->addToStore(info, source, NoRepair, NoCheckSigs);
storePath = std::move(info.path);
}