diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-08-11T19·03+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-08-11T19·03+0000 |
commit | 62fe5c4a22453c763e967f04bda062df8241c487 (patch) | |
tree | 60697c4c48402fb3f7b32260e19420edd973cff9 /src/libstore | |
parent | ae1a1efa410fa66a0afbfae25ad423feee4b1e77 (diff) |
* The predecessor of a successor need not be present. This in
particular happens on distributed builds or when using push/pull.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/normalise.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libstore/normalise.cc b/src/libstore/normalise.cc index 309c1777f7df..b3282b146be8 100644 --- a/src/libstore/normalise.cc +++ b/src/libstore/normalise.cc @@ -297,11 +297,13 @@ const char * * strings2CharPtrs(const Strings & ss) /* Should only be called after an expression has been normalised. */ Path queryNormalForm(const Path & nePath) { - StoreExpr ne = storeExprFromPath(nePath); - if (ne.type == StoreExpr::neClosure) return nePath; Path nfPath; - if (!querySuccessor(nePath, nfPath)) abort(); - return nfPath; + if (querySuccessor(nePath, nfPath)) return nfPath; + /* If there is no successor, than nePath must be a normal form + itself. */ + StoreExpr ne = storeExprFromPath(nePath); + if (ne.type != StoreExpr::neClosure) abort(); + return nePath; } |