From c6edb5c9667eac50baaedcc3cc39edbf99dea0e5 Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 23 Jan 2023 08:43:38 +0700 Subject: [PATCH] Trying to use ynh_secure_remove --- scripts/upgrade | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 187d204..5187e2f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,10 +58,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -# Remove www file -pushd "$final_path" - ynh_exec_warn_less sudo -u $app rm -rf * -popd +# Void and recreate final_path +ynh_secure_remove --file="$final_path" +ynh_exec_warn_less sudo -u $app mkdir "$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then