From 060370ef889829d6bacf08f62bd7a7b5ad53177d Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 6 Feb 2019 22:46:21 +0100 Subject: [PATCH] Fix #635 on ynh_secure_remove --- data/helpers.d/filesystem | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/helpers.d/filesystem b/data/helpers.d/filesystem index 6e0edfa37..88d51750b 100644 --- a/data/helpers.d/filesystem +++ b/data/helpers.d/filesystem @@ -392,10 +392,10 @@ ynh_secure_remove () { /var/www \ /home/yunohost.app" - if [[ -n "$2" ]] - then - echo "/!\ Packager ! You provided a second argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time." >&2 - fi + if [ $# -ge 2 ] + then + echo "/!\ Packager ! You provided more than one argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time." >&2 + fi if [[ "$forbidden_path" =~ "$file" \ # Match all paths or subpaths in $forbidden_path