forked from lix-project/lix
* 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.
This commit is contained in:
parent
3b3e1025c3
commit
68e55cd9da
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue