This commit is contained in:
Eelco Dolstra 2008-12-04 10:45:47 +00:00
parent f8713e1287
commit 63b8f09d8d

View file

@ -590,10 +590,11 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
PathSet refs; PathSet refs;
for (PathSet::iterator i = context.begin(); i != context.end(); ++i) { for (PathSet::iterator i = context.begin(); i != context.end(); ++i) {
if (isDerivation(*i)) Path path = *i;
if (path.at(0) == '=') path = string(path, 1);
if (isDerivation(path))
throw EvalError(format("in `toFile': the file `%1%' cannot refer to derivation outputs") % name); throw EvalError(format("in `toFile': the file `%1%' cannot refer to derivation outputs") % name);
/* !!! */ refs.insert(path);
refs.insert(*i);
} }
Path storePath = readOnlyMode Path storePath = readOnlyMode