From 21cef8fe4346903764b9903e8b011180daa18172 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 8 Jun 2022 17:19:54 -0500 Subject: Special-case file: protocol (empty string allowed) --- bollux | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bollux b/bollux index 668930e..4a8db07 100755 --- a/bollux +++ b/bollux @@ -477,7 +477,9 @@ ujoin() { # ujoin URL_ARRAY 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 -- cgit 1.4.1-21-gabe81