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