aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-30 10:16:19 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-10-30 10:22:58 +0100
commit66ddbef7547a2b5430c6d87e2d8d52977f7bf6f0 (patch)
treedd47c67718b9de379ae30fc39ba45d354035d8e4 /src/libexpr
parentf25791c196e7bcf76aa76e143a679fe731f77513 (diff)
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.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 6a50c9934..43dc20080 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]);