Special-case file: protocol (empty string allowed)
This commit is contained in:
parent
eb8f74b391
commit
21cef8fe43
4
bollux
4
bollux
|
@ -477,7 +477,9 @@ ujoin() { # ujoin URL_ARRAY<name>
|
|||
printf -v URL_ARRAY[0] "%s:" "${URL_ARRAY[1]}"
|
||||
fi
|
||||
|
||||
if ucdef URL_ARRAY[2]; then
|
||||
# Need special casing for file: protocol:
|
||||
# https://datatracker.ietf.org/doc/html/rfc1738#section-3.10
|
||||
if ucdef URL_ARRAY[2] || [[ "${URL_ARRAY[1]}" == file ]]; then
|
||||
printf -v URL_ARRAY[0] "${URL_ARRAY[0]}//%s" "${URL_ARRAY[2]}"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue