From 21d628b5981ea7a1abc98bfa3134f29ef9baa02e Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Fri, 17 Oct 2025 17:49:20 +0800 Subject: [PATCH 1/2] Try to fix backup --- sdata/step/3.install-files.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdata/step/3.install-files.sh b/sdata/step/3.install-files.sh index 7918f0ce0..f47239c7a 100644 --- a/sdata/step/3.install-files.sh +++ b/sdata/step/3.install-files.sh @@ -33,12 +33,11 @@ function backup_clashing_targets(){ # Construct args_includes for rsync for i in "${clash_list[@]}"; do - current_target=$target_dir/$i - if [[ -d $current_target ]]; then - args_includes+=(--include="$current_target/") - args_includes+=(--include="$current_target/**") + if [[ -d "$target_dir/$i" ]]; then + args_includes+=(--include="/$i/") + args_includes+=(--include="/$i/**") else - args_includes+=(--include="$current_target") + args_includes+=(--include="/$i") fi done args_includes+=(--exclude='*') From 7612a3f742bf17626e4ec7799cb33b0542517478 Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Fri, 17 Oct 2025 18:35:12 +0800 Subject: [PATCH 2/2] Use local var for args_includes --- sdata/step/3.install-files.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sdata/step/3.install-files.sh b/sdata/step/3.install-files.sh index f47239c7a..d213e75c6 100644 --- a/sdata/step/3.install-files.sh +++ b/sdata/step/3.install-files.sh @@ -32,6 +32,7 @@ function backup_clashing_targets(){ done # Construct args_includes for rsync + local args_includes=() for i in "${clash_list[@]}"; do if [[ -d "$target_dir/$i" ]]; then args_includes+=(--include="/$i/")