From 80fd64de92181c0c2e15579a529e0d02640d2558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 13 Mar 2017 23:08:35 +0100 Subject: [PATCH] modify path check --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4cff6f0..c7dfc19 100755 --- a/scripts/install +++ b/scripts/install @@ -20,10 +20,11 @@ FINAL_PATH="/var/www/$app" # Source app helpers . /usr/share/yunohost/helpers -# copy past from nextcloud package -if [ "${path:0:1}" != "/" ] && [ ${#path} -gt 0 ]; then +# if path do not begin with / add a / at the begining +if [ "${path:0:1}" != "/" ]; then path="/$path" fi +# if path do not end with / add a / at the end if [ "${path:${#path}-1}" == "/" ] && [ ${#path} -gt 1 ]; then path="${path:0:${#path}-1}" fi