From 66ddbef7547a2b5430c6d87e2d8d52977f7bf6f0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Oct 2017 10:16:19 +0100 Subject: fetchurl/fetchTarball: Respect name changes The computation of urlHash didn't take the name into account, so subsequent fetchurl calls with the same URL but a different name would resolve to the same cached store path. --- src/libexpr/primops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/primops.cc') diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 6a50c99345e4..43dc20080197 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1911,7 +1911,7 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v, { string url; Hash expectedHash; - string name; + string name = ""; state.forceValue(*args[0]); -- cgit 1.4.1