From fefef3dda7b6fccd76a7e401289305683483ff0c Mon Sep 17 00:00:00 2001 From: Amo Date: Fri, 28 May 2021 07:12:32 +0530 Subject: [PATCH] Fix upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5abf799..0d2bdc8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -106,9 +106,9 @@ then mkdir -p "$tmpdir/storage/export" mkdir -p "$final_path/storage/upload/" mkdir -p "$final_path/storage/export/" - cp -a "$final_path/storage/upload/*" "$tmpdir/storage/upload/" + cp -aT "$final_path/storage/upload" "$tmpdir/storage/upload/$" cp -a "$final_path/.env" "$tmpdir/.env" - cp -a "$final_path/storage/export/*" "$tmpdir/storage/export/" + cp -aT "$final_path/storage/export" "$tmpdir/storage/export/" ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src @@ -117,8 +117,8 @@ then # Restore the config file and data mkdir -p "$final_path/storage/upload/" mkdir -p "$final_path/storage/export/" - cp -a "$tmpdir/storage/upload/*" "$final_path/storage/upload/." - cp -a "$tmpdir/storage/export/*" "$final_path/storage/export/." + cp -aT "$tmpdir/storage/upload" "$final_path/storage/upload" + cp -aT "$tmpdir/storage/export" "$final_path/storage/export" cp -a "$tmpdir/.env" "$final_path/.env" # Remove temporary directory ynh_secure_remove --file="$tmpdir"