about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 95914626f1ca..355b81adf76d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1515,7 +1515,8 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
     } else
         url = state.forceStringNoCtx(*args[0], pos);
 
-    mkString(v, downloadFileCached(url, unpack), PathSet({url}));
+    Path res = downloadFileCached(url, unpack);
+    mkString(v, res, PathSet({res}));
 }