diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-16T00·10+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-16T00·10+0000 |
commit | 68e55cd9da7902ac8c8859507657cb013e234da4 (patch) | |
tree | 3ab58f4f7edf55c75d685161d799b20410b8c450 /scripts | |
parent | 3b3e1025c3d94dacb4c19c89f02e6a8684f93e58 (diff) |
* Since Hydra now escapes `+', `=' and `?' to %NN in URIs,
nix-prefetch-url should unescape them, because `%' is not a valid character in store path names.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nix-prefetch-url.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in index a2a8a701fe69..7d8bd93a42d8 100644 --- a/scripts/nix-prefetch-url.in +++ b/scripts/nix-prefetch-url.in @@ -21,7 +21,10 @@ if test -z "$url"; then exit 1 fi -name=$(basename "$url") +# Handle escaped characters in the URI. `+', `=' and `?' are the only +# characters that are valid in Nix store path names but have a special +# meaning in URIs. +name=$(basename "$url" | sed -e 's/%2b/+/g' -e 's/%3d/=/g' -e 's/%3f/\?/g') if test -z "$name"; then echo "invalid url"; exit 1; fi |