mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
Fix rootFS fingerprint in the impure case
This commit is contained in:
parent
5329a45ade
commit
a175c67def
1 changed files with 12 additions and 0 deletions
|
|
@ -72,6 +72,18 @@ struct UnionSourceAccessor : SourceAccessor
|
||||||
}
|
}
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::pair<CanonPath, std::optional<std::string>> getFingerprint(const CanonPath & path) override
|
||||||
|
{
|
||||||
|
if (fingerprint)
|
||||||
|
return {path, fingerprint};
|
||||||
|
for (auto & accessor : accessors) {
|
||||||
|
auto [subpath, fingerprint] = accessor->getFingerprint(path);
|
||||||
|
if (fingerprint)
|
||||||
|
return {subpath, fingerprint};
|
||||||
|
}
|
||||||
|
return {path, std::nullopt};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ref<SourceAccessor> makeUnionSourceAccessor(std::vector<ref<SourceAccessor>> && accessors)
|
ref<SourceAccessor> makeUnionSourceAccessor(std::vector<ref<SourceAccessor>> && accessors)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue