about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index ade483dc703d..a51a5119af3d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -9,7 +9,8 @@ static Expr primImport(EvalState & state, const ATermVector & args)
 {
     ATMatcher m;
     string path;
-    if (!(atMatch(m, args[0]) >> "Path" >> path))
+    Expr fn = evalExpr(state, args[0]);
+    if (!(atMatch(m, fn) >> "Path" >> path))
         throw Error("path expected");
     return evalFile(state, path);
 }