From 991873d35bd90f63e9a0a72b065075de32e389c8 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 5 Jul 2016 12:25:15 +0200 Subject: [PATCH] Force path to start with a leading slash. --- scripts/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install b/scripts/install index 9ccfaaa..de9c013 100644 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,11 @@ domain=$YNH_APP_ARG_DOMAIN path=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +# Force path to start with a / +if [ "${path:0:1}" != "/" ]; then + path="/$path" +fi + # Remove trailing slash to path path=${path%/} #force location to be / or /foo