mirror of
https://github.com/NixOS/nix
synced 2025-07-02 13:31:48 +02:00
fetchToStore(): Handle flat ingestion method and add test
This commit is contained in:
parent
173abec0bc
commit
7a086a32bc
3 changed files with 20 additions and 9 deletions
|
@ -14,7 +14,10 @@ StorePath InputAccessor::fetchToStore(
|
|||
Activity act(*logger, lvlChatty, actUnknown, fmt("copying '%s' to the store", showPath(path)));
|
||||
|
||||
auto source = sinkToSource([&](Sink & sink) {
|
||||
dumpPath(path, sink, filter ? *filter : defaultPathFilter);
|
||||
if (method == FileIngestionMethod::Recursive)
|
||||
dumpPath(path, sink, filter ? *filter : defaultPathFilter);
|
||||
else
|
||||
sink(readFile(path)); // FIXME: stream
|
||||
});
|
||||
|
||||
auto storePath =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue