From 0610a8291c143258e63aeee50713d80f32e8b3ad Mon Sep 17 00:00:00 2001 From: yuyr Date: Mon, 29 Jun 2026 18:20:47 +0800 Subject: [PATCH] preserve tmp mountpoint on reset --- scripts/soak/run_soak.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/soak/run_soak.sh b/scripts/soak/run_soak.sh index 414daa7..201008b 100755 --- a/scripts/soak/run_soak.sh +++ b/scripts/soak/run_soak.sh @@ -466,6 +466,12 @@ move_if_exists() { fi } +clear_dir_contents() { + local dir_path="$1" + [[ -d "$dir_path" ]] || return 0 + find "$dir_path" -mindepth 1 -maxdepth 1 -exec rm -rf {} + +} + db_state_exists() { [[ -e "$DB_DIR/work-db" || -e "$DB_DIR/repo-bytes.db" ]] } @@ -486,7 +492,7 @@ isolate_state_after_failure() { INVALID_TMP_PATH="$TMP_DIR" TMP_CLEANUP_STATUS="pending" TMP_CLEANUP_REASON="discard_after_failure" - rm -rf "$TMP_DIR" + clear_dir_contents "$TMP_DIR" mkdir -p "$TMP_DIR" TMP_CLEANUP_STATUS="discarded_recreated" else