about summary refs log tree commit diff
path: root/src/libstore/store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-14T18·54+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-14T18·54+0000
commitc757d16c8c180bc8a7d74494a2fc92aee7993631 (patch)
tree08b42e555fce99409702fe1104beaab40d71e490 /src/libstore/store.cc
parentbb2e53699fb413d5808ee285d2194a33006a19b8 (diff)
* Bug in clearSubstitutes().
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r--src/libstore/store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 0ac9473bc5b4..03855408ed4d 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -282,7 +282,8 @@ static PathSet getReferers(const Transaction & txn, const Path & storePath)
 void setReferences(const Transaction & txn, const Path & storePath,
     const PathSet & references)
 {
-    if (!isRealisablePath(txn, storePath))
+    /* For unrealisable paths, we can only clear the references. */
+    if (references.size() > 0 && !isRealisablePath(txn, storePath))
         throw Error(
             format("cannot set references for path `%1%' which is invalid and has no substitutes")
             % storePath);