about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-03-28T19·49+0200
committerEelco Dolstra <edolstra@gmail.com>2018-03-29T10·27+0200
commit9d1220a01d662c1089e77f16d5d3e1ead8f0ed4d (patch)
tree66b4a6197f825be557c0c9c26544645809878834 /src/libstore/store-api.cc
parente01c01f72ce40996234a4a1ded43fac894ddd6dd (diff)
ValidPathInfo::isContentAddressed(): Ensure there are no references
Diffstat (limited to 'src/libstore/store-api.cc')
-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 64f9b8d68b..1a0d12ca78 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();