Skip to content

Commit

Permalink
helpers2.1: fix is_data definition in ynh_restore (same as b516c14 bu…
Browse files Browse the repository at this point in the history
…t applied to ynh_restore)
  • Loading branch information
alexAubin committed Nov 13, 2024
1 parent f28487a commit 9805018
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/helpers.v2.1.d/backup
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ ynh_restore() {

# If the path starts with /var/log/$app or $data_dir
local is_data=false
if ([[ -n "${app:-}" ]] && [[ "$target" == "/var/log/$app*" ]]) || ([[ -n "${data_dir:-}" ]] && [[ "$target" == "$data_dir*" ]]); then
# If the path starts with /var/log/$app or $data_dir
if ([[ -n "${app:-}" ]] && [[ "$target" =~ ^/var/log/$app/?\*?$ ]]) || ([[ -n "${data_dir:-}" ]] && [[ "$target" =~ ^$data_dir ]]); then
is_data=true
fi

Expand Down

0 comments on commit 9805018

Please sign in to comment.