preserve tmp mountpoint on reset
This commit is contained in:
parent
b83acb281b
commit
0610a8291c
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user