From 9d1220a01d662c1089e77f16d5d3e1ead8f0ed4d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 Mar 2018 21:49:09 +0200 Subject: [PATCH] ValidPathInfo::isContentAddressed(): Ensure there are no references --- src/libstore/store-api.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();