From 4560806137951ce81742cbace737c1a3ccc96018 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sat, 18 Jul 2026 09:44:43 +0200 Subject: [PATCH] tools.func: replace rm -rf with find for safer directory cleanup --- misc/tools.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 7227f8bae..64669fad1 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -7157,7 +7157,7 @@ setup_meilisearch() { MEILI_DB_PATH="${MEILI_DB_PATH:-/var/lib/meilisearch/data}" msg_info "Removing old MeiliSearch database for migration" - rm -rf "${MEILI_DB_PATH:?}"/* + find "${MEILI_DB_PATH:?}" -mindepth 1 -delete # Import dump using CLI flag (this is the supported method) local DUMP_FILE="${MEILI_DUMP_DIR}/${DUMP_UID}.dump" @@ -9400,7 +9400,7 @@ fetch_and_deploy_from_url() { mkdir -p "$directory" if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then - rm -rf "${directory:?}/"* + find "${directory:?}" -mindepth 1 -delete fi local unpack_tmp