summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2017-03-13 17:08:32 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2017-03-13 17:08:32 +0000
commitfb2672d59f22395145cc8a46013836913a5e808e (patch)
treefd8367a12054364d2df34fcdd4588ad4366c4cfc /distrib
parenta5cf34a3fd68765fd28dbe967a8ac67254208519 (diff)
Remove leading slashes from response to ensure a proper url.
Feedback and OK halex@ tb@
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/install.sub4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 2546d68cb42..63e2c2105a4 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.987 2017/03/10 22:34:09 rpe Exp $
+# $OpenBSD: install.sub,v 1.988 2017/03/13 17:08:31 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -1635,7 +1635,7 @@ install_http() {
# Set HTTP_DIR to a default path in case it was not defined yet.
: ${HTTP_DIR:=pub/OpenBSD/$HTTP_SETDIR}
ask_until "Server directory?" "${resp:-$HTTP_DIR}"
- HTTP_DIR=$resp
+ HTTP_DIR=${resp##+(/)}
_url_base="$_http_proto://$HTTP_SERVER/$HTTP_DIR"
# Fetch SHA256.sig to create the list of files to select from.