aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-03-28 21:49:09 +0200
committerEelco Dolstra <edolstra@gmail.com>2018-03-29 12:27:42 +0200
commit9d1220a01d662c1089e77f16d5d3e1ead8f0ed4d (patch)
tree66b4a6197f825be557c0c9c26544645809878834 /src/libstore
parente01c01f72ce40996234a4a1ded43fac894ddd6dd (diff)
ValidPathInfo::isContentAddressed(): Ensure there are no references
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/store-api.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 64f9b8d68..1a0d12ca7 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -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();