Force path to start with a leading slash.

This commit is contained in:
opi 2016-07-05 12:25:15 +02:00
parent 1a3caf49c9
commit 991873d35b
1 changed files with 5 additions and 0 deletions

View File

@ -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