mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
ValidPathInfo::isContentAddressed(): Ensure there are no references
(cherry picked from commit 9d1220a01d)
This commit is contained in:
parent
59c54f877c
commit
247630287b
1 changed files with 2 additions and 1 deletions
|
|
@ -765,7 +765,8 @@ bool ValidPathInfo::isContentAddressed(const Store & store) const
|
|||
else if (hasPrefix(ca, "fixed:")) {
|
||||
bool recursive = ca.compare(6, 2, "r:") == 0;
|
||||
Hash hash(std::string(ca, recursive ? 8 : 6));
|
||||
if (store.makeFixedOutputPath(recursive, hash, storePathToName(path)) == path)
|
||||
if (references.empty() &&
|
||||
store.makeFixedOutputPath(recursive, hash, storePathToName(path)) == path)
|
||||
return true;
|
||||
else
|
||||
warn();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue