ValidPathInfo::isContentAddressed(): Ensure there are no references

This commit is contained in:
Eelco Dolstra
2018-03-29 12:27:42 +02:00
parent e01c01f72c
commit 9d1220a01d
+2 -1
View File
@@ -757,7 +757,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();