1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

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.
This commit is contained in:
Eelco Dolstra 2017-10-30 10:16:19 +01:00
parent f25791c196
commit 66ddbef754
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 4 additions and 2 deletions

View file

@ -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]);