mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
InputAccessor::fetchToStore(): Support arbitrary ingestion methods
This commit is contained in:
parent
d2c0051784
commit
12214fef09
4 changed files with 10 additions and 8 deletions
|
@ -2233,10 +2233,7 @@ static void addPath(
|
|||
});
|
||||
|
||||
if (!expectedHash || !state.store->isValidPath(*expectedStorePath)) {
|
||||
// FIXME
|
||||
if (method != FileIngestionMethod::Recursive)
|
||||
throw Error("'recursive = false' is not implemented");
|
||||
auto dstPath = state.rootPath(CanonPath(path)).fetchToStore(state.store, name, &filter, state.repair);
|
||||
auto dstPath = state.rootPath(CanonPath(path)).fetchToStore(state.store, name, method, &filter, state.repair);
|
||||
if (expectedHash && expectedStorePath != dstPath)
|
||||
state.debugThrowLastTrace(Error("store path mismatch in (possibly filtered) path added from '%s'", path));
|
||||
state.allowAndSetStorePathString(dstPath, v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue