* The predecessor of a successor need not be present. This in

particular happens on distributed builds or when using push/pull.
This commit is contained in:
Eelco Dolstra 2004-08-11 19:03:13 +00:00
parent ae1a1efa41
commit 62fe5c4a22
1 changed files with 6 additions and 4 deletions

View File

@ -297,11 +297,13 @@ const char * * strings2CharPtrs(const Strings & ss)
/* Should only be called after an expression has been normalised. */ /* Should only be called after an expression has been normalised. */
Path queryNormalForm(const Path & nePath) Path queryNormalForm(const Path & nePath)
{ {
StoreExpr ne = storeExprFromPath(nePath);
if (ne.type == StoreExpr::neClosure) return nePath;
Path nfPath; Path nfPath;
if (!querySuccessor(nePath, nfPath)) abort(); if (querySuccessor(nePath, nfPath)) return 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;
} }