about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-04T10·45+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-04T10·45+0000
commit63b8f09d8d8532e67009b7233f8f81e9326353ef (patch)
tree59598e199eb3b4503c31a7d58c9e5d201e013b93
parentf8713e1287e2641c3d2550f7af1a445c77b8552a (diff)
-rw-r--r--src/libexpr/primops.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 989a68682204..dce56c9a217c 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -590,10 +590,11 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
     PathSet refs;
 
     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);
-        /* !!! */
-        refs.insert(*i);
+        refs.insert(path);
     }
     
     Path storePath = readOnlyMode